## jagr2713 one year ago Fun question :D #Bored

1. jagr2713

Function F(n) defined over all positive integers n satisfies the following: $f(1)=1,f(2)=2, and$ $f(n+2)=f(n+1)+(f(n))^{2}+4022 \ for \ n \ge1$ How many of the 4022 integers f(1), f(2),....f(4022) are multiple of 7?

2. myininaya

well I notice f(3) is a multiple of 7 but checking all of those will be crazy so there has to be a slick way of doing this

3. jagr2713

:)

4. dan815

|dw:1436502484982:dw|

5. dan815

-1* mod 7

6. jagr2713

so thats the answer for you dan?

7. dan815

no just thinking

8. jagr2713

You will get it dan lol

9. jagr2713

hm

10. dan815

1

11. dan815

12. jagr2713

Well nope

13. dan815

i think my arithmetic is wrong maybe, i got a repetition at f(9) ill put what i got

14. jagr2713

Lol @dan815

15. myininaya

well going to the whole mod thing I guess we can really just look at: $f(n+2)=f(n+1)+(f(n))^2+4 \text{ thinking in mod } 7$ these will make the outputs easier to look at but that is still a lot of f( ) thingys to check: $f(1)=1,f(2)=2,f(3)=7=0,f(4)=15=1, f(5)=68=5$ hmmm... $f(6)=f(5)+(f(4))^2+4 \\ f(6)=5+1^2+4=10=3 \\ f(7)=f(6)+(f(5))^2+4 \\ f(7)=3+(5)^2+4=25=4 \\ f(8)=f(7)+(f(6))^2+4 \\ f(8)=4+(3)^2+4 \\ f(8)=1+9=10=3 \\ f(9)=f(8)+(f(7))^2+4 \\ f(9)=3+4^2+4=4^2=2 \\ f(10)=f(9)+(f(8))^2+4 \\ f(10)+2+3^2+4=6+2=8=1 \\ f(11)=f(10)+(f(9))^2+4 \\ f(11)=1+2^2+4=9=2$ $f(12)=f(11)+(f(10))^2+4 \\ f(12)=2+1^2+4=7=0$ I think f(3) and f(12) so far are multiples of 7

16. dan815

|dw:1436504022956:dw|

17. dan815

k ya i saw myin writing same thing

18. jagr2713

lol nope @myininaya

19. myininaya

20. jagr2713

Oh thought you did lol sorry

21. myininaya

I'm showing my work so far hoping it can help anyone else trigger more thoughts but my thought actually came from dan's work above

22. dan815

i have a feeling we will run into a repeating pattern in mod 7 like every 9th maybe

23. geerky42

I solved it by programming and I asked @jagr2713 for confirmation of my answer but he insisted me to post my answer here lol...  numbers = [1, 2] total = 0 for x in range(3, 4023): NewNumber = (numbers[1] + (numbers[0])**2 + 4022)%7 if NewNumber%7 == 0: total +=1 numbers = [numbers[1], NewNumber] print(total)  Output is 447

24. ganeshie8

Lets conjecture $7\mid f(3+9k)$

25. dan815

:P 4022 / 9 = 446.8 pretty close hehe

26. ganeshie8

based on @myininaya 'w work..

27. jagr2713

WOw great work

28. jagr2713

Great job :D

29. dan815

brute force cheattoorr

30. jagr2713

lol dan got right after geerky lol

31. myininaya

I see pattern 1,2,0,1,5,3,4,3,2,1,2,0,1,5,3,4,3,2,1,2,0,1,5,3,4,3,2,1,2,0,1,5,3,4,3,2,... I wonder if this is the pattern we have a 0 at 3rd term,12th term, 21th term, oh and I see where @ganeshie8 get's his conjecture now

32. dan815

yep

33. dan815

34. jagr2713

k let start typing it :D

35. ganeshie8

the proof might be interesting

36. dan815

by induction it can be proven

37. myininaya

I would love to see a proof on this but I think that is above me.

38. dan815

once you get a full repettiion it must be true

39. dan815

but there could be a neater proof this is a lame way to prove it

40. ganeshie8

that is true, once the remainders start repeating, we're technically done!

41. myininaya

sadly i can't stay for the fun @jagr2713 will post it is time for me to retire :(

42. dan815

good night myin

43. jagr2713

For all real numbers x, the function f(x) satisfies $f(1+x)+xf(1-x)=x ^{2}+9x$ If the values of f(-7) can be expressed as $\frac{ a }{ b }$ Where a and b are coprime positive integers/ What is a+b Here you go @dan815

44. jagr2713

see ya @myininaya D:

45. dan815

f(1+x)=9x f(1-x)=x?

46. dan815

x*f(1-x)= x^2+ax+b f(1+x)=cx+d

47. dan815

oh and since u applied x after there can be no constant term in both

48. dan815

therefore f(1-x)=x+b and f(1+x)=ax they must of this tform

49. dan815

f(1+x) cannot have a constant term

50. dan815

and f(1-x) cannot have a coefficient on the x

51. dan815

so we are restrited with the unknowns here

52. dan815

restricted*

53. jagr2713

hm

54. dan815

f(1-x)=x+b and f(1+x)=ax f(-7)=-7+b f(-7)=-7a and f(-7)= c/d, where c and d are co prime int hmm i am wondering if the first lines are really okay to assume

55. jagr2713

hm lol waiting lol falling asleep lol

56. dan815

f(-7)=-7+b f(-7)=-7a a+b=9 f(-7)=-7+ 9-a =2-a f(-7)=-7*(a) 2-a=-7a a=1/3

57. dan815

lol what is going on

58. Empty

I don't know but I'll guess 13 and then I think I'll try solving it to make sure.

59. ganeshie8

$\large a+b=217$

60. dan815

howd u do it

61. jagr2713

62. jagr2713

63. ganeshie8

simply plugin $$x=\pm 8$$, you will get two linear eqn's which you can solve

64. ganeshie8

$\large a+b=229$ ?

65. jagr2713

Correcto :D Finally now i can sleep lol

66. jagr2713

dont know who to give the stars D:

67. Empty

Ahhh good trick @ganeshie8 ! I had tried to turn this into a differential equation like yesterday and got something completely terrible.

68. Empty

Ahhh good trick @ganeshie8 ! I had tried to turn this into a differential equation like yesterday and got something completely terrible.

69. dan815

ah i liked it

70. Empty

It looks like you also get the answer to what f(9) is for free as well haha

71. ganeshie8

I subed 1+x=u and 1-x=v and tried to get a differential eqn like yesterday but got stuck

72. Empty

@ganeshie8 What you could try instead is plug in 1-x=y+h and 1-x=y and that'll turn it into a differential equation.

73. ganeshie8

this could be an interesting question For all real numbers x, the function f(x) satisfies $f(1+x)+xf(1-x)=x ^{2}+9x$ find $$f(x)$$ Here you go @dan815

74. ganeshie8

Ahh okay I see that should make it easy..

75. Empty

Unfortunately (I might have done it wrong) the differential equation we get is not a very pretty one to solve but we can do it with an integrating factor it seems, I just think it ends up having the erf(x) function in there as part of the answer #_#

76. dan815

do you think this assumption is right f(1+x)=ux f(1-x)=x+v

77. Empty

Hmmm I don't know?

78. dan815

if we ignore the fourier series and other orthogonal representations to polynomial functions

79. dan815

f(1+x)+x*f(1-x) = x^2+-9x then can we say f(1+x) must be 1 degree lower than x*f(1-x) so the x^2 term must come from that term

80. Empty

Ahhh I see what you're looking at now and why you would say that but I'm sure if I know if we can do that or not. Interesting observation though. It looks like we should be able to solve for f(x)=ax+b by plugging in I think.

81. ganeshie8

yeah at least we will get all linear functions, if not all

82. dan815

yea because if this is really true u get restrictions all over the place since then x*f(1-x) cannot have a constant term that means f(1-x) must have form ax+b and then f(1+x) cannot have a constnat term as it all equalys x^2+9x

83. dan815

f(1-x)= x + u f(1+x)=v*x u+v=9

84. Empty

I was also considering if we get anything by splitting it up into an even and odd function: f(x)=g(x)+h(x) g(x)=g(-x) and h(x)=-h(-x) since we can always do this, then make a pair of equations this way that will be easy to solve hopefully.

85. dan815

oo

86. ganeshie8

Looks f(x) cannot be a polynomial

87. ganeshie8

does this work f(1+x) + xf(1-x) = x^2+9x f(1-x) -xf(1+x) = x^2-9x ----------------------------- f(1-x)(1+x^2) = x^3+10x^2-9x f(1-x) = (x^3+10x^2-9x)/(1+x^2)

88. dan815

i think so, now u can rewrite the right side as functions of 1-x ?

89. ganeshie8

wow yeah 1-x = u should do

90. Empty

Nice, that wasn't so bad after all haha

91. Empty

So if we look at f(x) as being a generating function, what's the sequence it generates? :O