login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A322489 Numbers k such that k^k ends with 4. 2
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.

LINKS

Colin Barker, Table of n, a(n) for n = 1..1000

Index entries for linear recurrences with constant coefficients, signature (1,1,-1).

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.

MAPLE

select(n->n^n mod 10=4, [$1..558]); # Paolo P. Lava, Dec 18 2018

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 xrange(1, 70)]

(Julia) [10*n+3*(-1)^n-5 for n in 1:70] |> println

(PARI) apply(A322489(n)=10*n+3*(-1)^n-5, [1..70]) \\ M. F. Hasler, Dec 14 2018

(PARI) Vec(2*x*(1 + 8*x + x^2) / ((1 - x)^2*(1 + x)) + O(x^70)) \\ Colin Barker, Dec 13 2018

CROSSREFS

Cf. A004526, A056849.

Subsequence of A139544, A235700.

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).

Sequence in context: A092587 A247457 A015787 * A063430 A031104 A115042

Adjacent sequences:  A322486 A322487 A322488 * A322490 A322491 A322492

KEYWORD

nonn,base,easy

AUTHOR

Bruno Berselli, Dec 12 2018

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 21 19:19 EDT 2019. Contains 328308 sequences. (Running on oeis4.)