A262721 Modified Look and Say sequence: compute sum of digits of previous term, square it, and apply the "Say What You See" process.
1, 11, 14, 1215, 1811, 111211, 1419, 2215, 1120, 1116, 1811, 111211, 1419, 2215, 1120, 1116, 1811, 111211, 1419, 2215, 1120, 1116, 1811, 111211, 1419, 2215, 1120, 1116, 1811, 111211, 1419, 2215, 1120, 1116, 1811, 111211, 1419, 2215, 1120, 1116
Offset: 0
Examples
a(0) = 1 has 1 digit, and the sum of digits is 1, and the square of the sum of digits is 1. So a(1) = 11, that is, one times 1. a(1) = 11 has 2 digits, and the sum of digits is 1+1=2 and the square of the sum of digits is 4. So a(2) = 14, that is, one times 4. Since a(2)=14, we compute 1+4=5, 5^2 = 25, where we see one 2 and one 5, so a(3)=1215.
Links
- Abdul Gaffar Khan, Generalization of A262721
Crossrefs
Programs
-
Mathematica
A262721[0] := 1; A262721[n_] := A262721[n] = FromDigits[ Flatten[{Length[#], First[#]} & /@ Split[IntegerDigits[ Total[IntegerDigits[A262721[n - 1]]]^2]]]]; Table[ A262721[n], {n, 0, 100}]
-
PARI
say(n) = {d = digits(n); da = d[1]; na = 1; s = ""; for (k=2, #d, if (d[k] == da, na++, s = concat(s, Str(na, da)); na = 1; da = d[k]);); s = concat(s, Str(na, da)); eval(s);} lista(nn) = {print1(a=1, ", "); for (k=2, nn, a = say(sumdigits(a)^2); print1(a, ", "););} \\ Michel Marcus, Sep 29 2015
Formula
1. a(0) = 1, a(n) = 'frequency' of digits in the square of the sum of digits of a(n-1) followed by 'digit'-indication.
2. a(0) = 1, a(n) = A005150(A118881(a(n-1))). Here first deal with the type of operations of A118881 on a(n-1)-th term and then deal with the operation of A005150 on obtained value from A118881(a(n-1)) in last step, instead of following a(n-1) term of A118881 and A118881(a(n-1)) as a member of sequences A118881 and A005150 respectively.
Comments