login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A338917 a(n) = sum_of_digits(a(n-1)^a(n-2)) where a(1)=1 and a(2)=2. 1
1, 2, 2, 4, 7, 7, 25, 34, 151, 331, 1690, 3265, 26449, 64528, 574513, 1671208, 16090657, 54199564, 559922497, 2133503863, 23506132363 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
FORMULA
a(n) == 7 (mod 9) for n >= 5. - Hugo Pfoertner, Nov 15 2020
EXAMPLE
for n=6, a(6) = sum_of_digits(7^7) = sum_of_digits(823543) = 25
MATHEMATICA
a[1]:=1; a[2]:=2; a[n_]:=Total[IntegerDigits[a[n-1]^a[n-2]]]; Array[a, 19] (* Stefano Spezia, Nov 15 2020 *)
PROG
(SageMath)
a, b=1, 2
L=[a, b]
for n in [1..17]:
c=b^a
c=sum(c.digits())
L.append(c)
a, b=b, c
print(L)
(PARI) a338917(nmax)={my(x=vector(nmax)); x[1]=1; x[2]=2; for(k=3, nmax, x[k]=sumdigits(x[k-1]^x[k-2])); x};
a338917(18) \\ Hugo Pfoertner, Nov 15 2020
CROSSREFS
Cf. A007953.
Sequence in context: A244011 A065968 A105669 * A256963 A355306 A019657
KEYWORD
nonn,base,more
AUTHOR
Sean Lestrange, Nov 15 2020
EXTENSIONS
a(20) from Hugo Pfoertner, Nov 15 2020
a(21) from Chai Wah Wu, Nov 19 2020
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 18 22:18 EDT 2024. Contains 371782 sequences. (Running on oeis4.)