OFFSET
1,1
COMMENTS
Also numbers k such that k and (2^(2*h+1))^k (for n>=0) end with the same digit. - Bruno Berselli, Dec 13 2018
LINKS
FORMULA
From Colin Barker, Dec 01 2012: (Start)
G.f.: 2*x*(2*x^2 + x + 7)/((x - 1)^2*(x + 1)).
a(n) = a(n-1) + a(n-2) - a(n-3).
a(n) = 10*n - 4*(-1)^n. (End)
EXAMPLE
2^36 = 68719476736 hence 36 is in the sequence.
MATHEMATICA
LinearRecurrence[{1, 1, -1}, {14, 16, 34}, 70] (* Harvey P. Dale, Aug 19 2021 *)
PROG
(PARI) isok(n) = (2^n - n) % 10 == 0; \\ Michel Marcus, Nov 23 2013
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Benoit Cloitre, Mar 07 2002
EXTENSIONS
Example corrected by Michel Marcus, Nov 23 2013
STATUS
approved