[go: up one dir, main page]

login
A092952
Smallest unhappy number that takes n iterations of the sum of the squares of digits to reach 4, which is the smallest number of the unhappy numbers cycle.
2
4, 2, 11, 113, 78, 58, 29, 16, 4, 2, 9, 3, 36, 6, 29, 16, 4, 2, 9, 3, 36, 6, 29, 16, 4, 2, 9, 3, 36, 6, 29, 16, 4, 2, 9, 3, 36, 6, 29, 16, 4, 2, 9, 3, 36, 6, 29, 16, 4, 2, 9, 3, 36, 6, 29, 16, 4, 2, 9, 3, 36, 6, 29, 16, 4, 2, 9, 3, 36, 6, 29, 16, 4, 2, 9, 3
OFFSET
1,1
LINKS
Eric Weisstein's World of Mathematics, Unhappy Numbers
FORMULA
From Colin Barker, Jul 11 2019: (Start)
G.f.: x*(4 + 2*x + 11*x^2 + 113*x^3 + 78*x^4 + 58*x^5 + 29*x^6 + 16*x^7 - 2*x^10 - 110*x^11 - 42*x^12 - 52*x^13) / ((1 - x)*(1 + x)*(1 + x^2)*(1 + x^4)).
a(n) = a(n-8) for n>8.
(End)
EXAMPLE
113 is the fourth number of the sequence because it takes 4 iterations to reach 4: 113 / 1^2 + 1^2 + 3^2 = 11 / 1^2 + 1^2 = 2 / 2^2 = 4.
PROG
(PARI) Vec(x*(4 + 2*x + 11*x^2 + 113*x^3 + 78*x^4 + 58*x^5 + 29*x^6 + 16*x^7 - 2*x^10 - 110*x^11 - 42*x^12 - 52*x^13) / ((1 - x)*(1 + x)*(1 + x^2)*(1 + x^4)) + O(x^80)) \\ Colin Barker, Jul 11 2019
CROSSREFS
Sequence in context: A094406 A142706 A361216 * A286145 A010318 A188134
KEYWORD
nonn,base,easy
AUTHOR
Sergio Pimentel, Apr 23 2004
EXTENSIONS
Edited by Charles R Greathouse IV, Aug 03 2010
STATUS
approved