OFFSET
0,3
COMMENTS
Apart from the first two terms all the other numbers can be formed adding in sequence 2, 4, 6, 6, 2 and so on. Example 1+(2)=3; 3+(4)=7; 7+(6)=13; 13+(6)=19; 19+(2)=21; ...
LINKS
Harvey P. Dale, Table of n, a(n) for n = 0..250
FORMULA
a(n) = a(n-1)+ (abs(2^a(n-1)*a(n-1)) mod 10) being a(0) = 0 and a(1) = 1
EXAMPLE
a(2)= 1 + abs(2^1 *1)mod 10 = 1 + 2 mod 10 = 1 + 2 = 3
MAPLE
ANM:=proc(N) local an, i, anminus1, anplus1; anminus1:=0; an:=1; print (anminus1); print (an); for i from 2 by 1 to N do anplus1:=an+(abs(2^an*an) mod 10); print(anplus1); anminus1:=an; an:=anplus1; od; end: ANM(100);
MATHEMATICA
Join[{0}, NestList[#+Mod[Abs[2^# #], 10]&, 1, 60]] (* Harvey P. Dale, Jul 01 2022 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Paolo P. Lava and Giorgio Balzarotti, May 19 2006
STATUS
approved