[go: up one dir, main page]

login
A061728
Start with (a, b) = (2, 4). The next pair (a', b') is ((b + 1) mod 10, (a + 1) mod 10) where (a, b) is the previous pair.
2
2, 4, 5, 3, 4, 6, 7, 5, 6, 8, 9, 7, 8, 0, 1, 9, 0, 2, 3, 1, 2, 4, 5, 3, 4, 6, 7, 5, 6, 8, 9, 7, 8, 0, 1, 9, 0, 2, 3, 1, 2, 4, 5, 3, 4, 6, 7, 5, 6, 8, 9, 7, 8, 0, 1, 9, 0, 2, 3, 1, 2, 4, 5, 3, 4, 6, 7, 5, 6, 8, 9, 7, 8, 0, 1, 9, 0, 2, 3, 1, 2, 4, 5, 3, 4, 6, 7, 5, 6, 8, 9, 7, 8, 0, 1, 9, 0, 2, 3, 1, 2, 4, 5, 3, 4
OFFSET
1,1
COMMENTS
Has period 20.
REFERENCES
Norman Sullivan, Test Your Own IQ, Workman Publishing Co. New York, NY, 1994, pp. 49, 51.
LINKS
Index entries for linear recurrences with constant coefficients, signature (1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1).
FORMULA
From Colin Barker, Jul 02 2018: (Start)
G.f.: x*(2 + 2*x + 3*x^2 + 4*x^4 + 2*x^5 + 5*x^6 + 6*x^8 + 2*x^9 + 7*x^10 + 8*x^12 - 8*x^13 + 9*x^14 + 2*x^17 + x^18) / ((1 - x)*(1 + x^2)*(1 - x + x^2 - x^3 + x^4)*(1 + x + x^2 + x^3 + x^4)*(1 - x^2 + x^4 - x^6 + x^8)).
a(n) = a(n-1) - a(n-2) + a(n-3) - a(n-4) + a(n-5) - a(n-6) + a(n-7) - a(n-8) + a(n-9) - a(n-10) + a(n-11) - a(n-12) + a(n-13) - a(n-14) + a(n-15) - a(n-16) + a(n-17) - a(n-18) + a(n-19) for n>19.
(End)
a(1) = 2, a(2) = 4. {a(n+1), a(n+2)} = (1 + {a(n), a(n - 1)}) mod 10. - Michael De Vlieger, Jul 01 2018
a(n) = (2*floor(n/4) + floor(3*(n mod 4)/2) + 1) mod 10. - Jon E. Schoenfield, Jul 01 2018
EXAMPLE
24 (42)-> 53, (35)-> 46, (64)-> 75.
MATHEMATICA
Nest[Append[#, Mod[1 + {#2, #1}, 10] & @@ #[[-1]]] &, {{2, 4}}, 42] // Flatten (* Michael De Vlieger, Jul 01 2018 *)
PROG
(PARI) { f="b061728.txt"; for (n=1, 500, if (n==1, a=2; b=4, s=a; a=(b + 1)%10; b=(s + 1)%10); write(f, 2*n - 1, " ", a); write(f, 2*n, " ", b) ) } \\ Harry J. Smith, Jul 27 2009
(PARI) Vec(x*(2 + 2*x + 3*x^2 + 4*x^4 + 2*x^5 + 5*x^6 + 6*x^8 + 2*x^9 + 7*x^10 + 8*x^12 - 8*x^13 + 9*x^14 + 2*x^17 + x^18) / ((1 - x)*(1 + x^2)*(1 - x + x^2 - x^3 + x^4)*(1 + x + x^2 + x^3 + x^4)*(1 - x^2 + x^4 - x^6 + x^8)) + O(x^150)) \\ Colin Barker, Jul 02 2018
CROSSREFS
Cf. A061729.
Sequence in context: A071286 A021807 A284561 * A332017 A276127 A182115
KEYWORD
nonn,easy,base
AUTHOR
Jason Earls, May 06 2001
EXTENSIONS
More terms from Larry Reeves (larryr(AT)acm.org), May 07 2001
Offset changed from 24 to 1 by Harry J. Smith, Jul 27 2009
Name edited by David A. Corneth and Jon E. Schoenfield, Jul 05 2018
Edited by N. J. A. Sloane, Jul 06 2018
STATUS
approved