cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A322489 Numbers k such that k^k ends with 4.

This page as a plain text file.
%I A322489 #51 Feb 27 2023 04:02:34
%S A322489 2,18,22,38,42,58,62,78,82,98,102,118,122,138,142,158,162,178,182,198,
%T A322489 202,218,222,238,242,258,262,278,282,298,302,318,322,338,342,358,362,
%U A322489 378,382,398,402,418,422,438,442,458,462,478,482,498,502,518,522,538,542,558
%N A322489 Numbers k such that k^k ends with 4.
%C A322489 Also numbers k == 2 (mod 4) such that 2^k and k^2 end with the same digit.
%C A322489 Numbers congruent to {2, 18} mod 20. - _Amiram Eldar_, Feb 27 2023
%H A322489 Colin Barker, <a href="/A322489/b322489.txt">Table of n, a(n) for n = 1..1000</a>
%H A322489 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (1,1,-1).
%F A322489 O.g.f.: 2*x*(1 + 8*x + x^2)/((1 + x)*(1 - x)^2).
%F A322489 E.g.f.: 2 + 3*exp(-x) + 5*(2*x - 1)*exp(x).
%F A322489 a(n) = -a(-n+1) = a(n-1) + a(n-2) - a(n-3).
%F A322489 a(n) = 10*n + 3*(-1)^n - 5. Therefore:
%F A322489 a(n) = 10*n - 8 for odd n;
%F A322489 a(n) = 10*n - 2 for even n.
%F A322489 a(n+2*k) = a(n) + 20*k.
%F A322489 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
%p A322489 select(n->n^n mod 10=4,[$1..558]); # _Paolo P. Lava_, Dec 18 2018
%t A322489 Table[10 n + 3 (-1)^n - 5, {n, 1, 60}]
%o A322489 (Sage) [10*n+3*(-1)^n-5 for n in (1..70)]
%o A322489 (Maxima) makelist(10*n+3*(-1)^n-5, n, 1, 70);
%o A322489 (GAP) List([1..70], n -> 10*n+3*(-1)^n-5);
%o A322489 (Magma) [10*n+3*(-1)^n-5: n in [1..70]];
%o A322489 (Python) [10*n+3*(-1)**n-5 for n in range(1, 70)]
%o A322489 (Julia) [10*n+3*(-1)^n-5 for n in 1:70] |> println
%o A322489 (PARI) apply(A322489(n)=10*n+3*(-1)^n-5, [1..70]) \\ _M. F. Hasler_, Dec 14 2018
%o A322489 (PARI) Vec(2*x*(1 + 8*x + x^2) / ((1 - x)^2*(1 + x)) + O(x^70)) \\ _Colin Barker_, Dec 13 2018
%Y A322489 Cf. A004526, A056849.
%Y A322489 Subsequence of A139544, A235700.
%Y A322489 Numbers k such that k^k ends with d: A008592 (d=0), A017281 (d=1), A067870 (d=3), this sequence (d=4), A017329 (d=5), A271346 (d=6), A322490 (d=7), A017377 (d=9).
%K A322489 nonn,base,easy
%O A322489 1,1
%A A322489 _Bruno Berselli_, Dec 12 2018