[go: up one dir, main page]

login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Sum of digits of the square of the sum of the preceding numbers.
1

%I #15 Jun 16 2021 09:55:56

%S 1,1,4,9,9,18,18,9,18,27,27,27,18,27,27,18,27,18,27,18,9,27,27,27,27,

%T 18,27,9,27,27,27,9,27,27,36,27,27,27,18,27,27,27,27,27,36,36,9,27,27,

%U 18,36,36,27,18,27,18,27,27,27,27,36,36,27,18,36,27,36

%N Sum of digits of the square of the sum of the preceding numbers.

%C As soon as a term is 9 or multiple of 9, which is true for a(4), all following ones are also multiple of 9, which never occurs in A065075.

%t nxt[{t_,a_}]:=Module[{c=Total[IntegerDigits[t^2]]},{t+c,c}]; NestList[ nxt,{1,1},70][[All,2]] (* _Harvey P. Dale_, Jun 15 2021 *)

%o (Python)

%o def sd(n): return sum(map(int, str(n)))

%o def aupton(terms):

%o alst, s = [1], 1

%o for n in range(2, terms+1): alst.append(sd(s**2)); s += alst[-1]

%o return alst

%o print(aupton(67)) # _Michael S. Branicky_, Jun 15 2021

%Y Cf. A065075.

%K base,easy,nonn

%O 1,3

%A Philippe Lallouet (philip.lallouet(AT)orange.fr), Apr 20 2008

%E Corrected and extended by _Harvey P. Dale_, Jun 15 2021