|
|
A322489
|
|
Numbers k such that k^k ends with 4.
|
|
3
|
|
|
2, 18, 22, 38, 42, 58, 62, 78, 82, 98, 102, 118, 122, 138, 142, 158, 162, 178, 182, 198, 202, 218, 222, 238, 242, 258, 262, 278, 282, 298, 302, 318, 322, 338, 342, 358, 362, 378, 382, 398, 402, 418, 422, 438, 442, 458, 462, 478, 482, 498, 502, 518, 522, 538, 542, 558
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
Also numbers k == 2 (mod 4) such that 2^k and k^2 end with the same digit.
Numbers congruent to {2, 18} mod 20. - Amiram Eldar, Feb 27 2023
|
|
LINKS
|
|
|
FORMULA
|
O.g.f.: 2*x*(1 + 8*x + x^2)/((1 + x)*(1 - x)^2).
E.g.f.: 2 + 3*exp(-x) + 5*(2*x - 1)*exp(x).
a(n) = -a(-n+1) = a(n-1) + a(n-2) - a(n-3).
a(n) = 10*n + 3*(-1)^n - 5. Therefore:
a(n) = 10*n - 8 for odd n;
a(n) = 10*n - 2 for even n.
a(n+2*k) = a(n) + 20*k.
Sum_{n>=1} (-1)^(n+1)/a(n) = tan(2*Pi/5)*Pi/20 = sqrt(5+2*sqrt(5))*Pi/20. - Amiram Eldar, Feb 27 2023
|
|
MAPLE
|
|
|
MATHEMATICA
|
Table[10 n + 3 (-1)^n - 5, {n, 1, 60}]
|
|
PROG
|
(Sage) [10*n+3*(-1)^n-5 for n in (1..70)]
(Maxima) makelist(10*n+3*(-1)^n-5, n, 1, 70);
(GAP) List([1..70], n -> 10*n+3*(-1)^n-5);
(Magma) [10*n+3*(-1)^n-5: n in [1..70]];
(Python) [10*n+3*(-1)**n-5 for n in range(1, 70)]
(Julia) [10*n+3*(-1)^n-5 for n in 1:70] |> println
(PARI) Vec(2*x*(1 + 8*x + x^2) / ((1 - x)^2*(1 + x)) + O(x^70)) \\ Colin Barker, Dec 13 2018
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|