|
|
A124625
|
|
Even numbers sandwiched between 1's.
|
|
11
|
|
|
1, 0, 1, 2, 1, 4, 1, 6, 1, 8, 1, 10, 1, 12, 1, 14, 1, 16, 1, 18, 1, 20, 1, 22, 1, 24, 1, 26, 1, 28, 1, 30, 1, 32, 1, 34, 1, 36, 1, 38, 1, 40, 1, 42, 1, 44, 1, 46, 1, 48, 1, 50, 1, 52, 1, 54, 1, 56, 1, 58, 1, 60, 1, 62, 1, 64, 1, 66, 1, 68, 1, 70, 1, 72, 1, 74, 1, 76, 1, 78, 1, 80, 1, 82, 1, 84
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,4
|
|
COMMENTS
|
Created to simplify the definition of A129952.
Starting (1, 2, 1, 4,...): square (1 + x - x^2 - x^3 + x^4 + x^5 - ...) = (1 + 2x - x^2 - 4x^3 + x^4 + 6x^5 - ...).
With a(3) taken as 0, a(n+2) = n^k+1 mod 2*n, n>=1, for any k>=2, also for k=n. - Wolfdieter Lang, Dec 21 2011
Greatest common divisor of n-1 and (n-1) mod 2. - Bruno Berselli, Mar 07 2017
|
|
REFERENCES
|
Murat Sahin and Elif Tan, Conditional (strong) divisibility sequences, Fib. Q., 56 (No. 1, 2018), 18-31.
|
|
LINKS
|
|
|
FORMULA
|
a(n) = 1 for even n, a(n) = n-1 for odd n.
a(2*k) = 1, a(2*k+1) = 2*k.
G.f.: (1 - x^2 + 2*x^3)/((1 - x)^2*(1 + x)^2).
E.g.f.: 1 + x^2*U(0)/2 where U(k)= 1 + 2*x*(k+1)/(2*k + 3 - x*(2*k+3)/(x + 4*(k+2)*(k+1)/U(k+1)) (continued fraction, 3rd kind, 3-step). - Sergei N. Gladkovskii, Oct 20 2012
a(n) = (n-1) - a(a(n-1))*a(n-1), a(0) = 0. - Eli Jaffe, Jun 07 2016
|
|
MAPLE
|
|
|
MATHEMATICA
|
|
|
PROG
|
(PARI) {for(n=0, 85, print1(if(n%2>0, n-1, 1), ", "))}
(Magma) &cat[[1, 2*k]: k in [0..42]];
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|