[go: up one dir, main page]

login
Search: a062685 -id:a062685
     Sort: relevance | references | number | modified | created      Format: long | short | data
Sum of digits of n^2.
+10
68
0, 1, 4, 9, 7, 7, 9, 13, 10, 9, 1, 4, 9, 16, 16, 9, 13, 19, 9, 10, 4, 9, 16, 16, 18, 13, 19, 18, 19, 13, 9, 16, 7, 18, 13, 10, 18, 19, 13, 9, 7, 16, 18, 22, 19, 9, 10, 13, 9, 7, 7, 9, 13, 19, 18, 10, 13, 18, 16, 16, 9, 13, 19, 27, 19, 13, 18, 25, 16, 18, 13, 10, 18, 19, 22, 18, 25, 25, 18, 13
OFFSET
0,3
COMMENTS
If 3|n then 9|a(n); otherwise, a(n) == 1 (mod 3). - Jon E. Schoenfield, Jun 30 2018
LINKS
H. Davenport and P. Erdős, Note on normal decimals, Canadian Journal of Mathematics 4 (1952), pp. 58-63.
Michael Drmota, Christian Mauduit and Joël Rivat, The sum-of-digits function of polynomial sequences, J. Lond. Math. Soc. (2) 84(2011), no. 1, 81--102. MR2819691 (2012f:11193)
Bernt Lindström, On the binary digits of a power, Journal of Number Theory, Volume 65, Issue 2, August 1997, Pages 321-324.
Christian Mauduit and Joël Rivat, La somme des chiffres des carrés, Acta Mathem. 203 (1) (2009) 107-148. MR2545827 (2010j:11119).
H. I. Okagbue, M. O. Adamu, S. A. Iyase and A. A. Opanuga, Sequence of Integers Generated by Summing the Digits of their Squares, Indian Journal of Science and Technology, Vol 8(15), DOI: 10.17485/ijst/2015/v8i15/69912, July 2015.
K. B. Stolarsky, The binary digits of a power, Proc. Amer. Math. Soc. 71 (1978), 1-5.
FORMULA
a(n) = A007953(A000290(n)); a(A058369(n)) = A007953(A058369(n)). - Reinhard Zumkeller, Apr 25 2009
a(10n) = a(n). If n > 1 is not a multiple of 10, then a(n)=4 iff n = 10^k+1 = A062397(k), a(n)=7 iff n is in A215614={4, 5, 32, 49, 149, 1049}, and else a(n) >= 9. - M. F. Hasler, Sep 23 2014
EXAMPLE
Trajectories under the map x -> a(x):
1 -> 1 -> 1 -> 1 -> 1 -> 1 -> 1 -> 1 -> 1 -> ...
2 -> 4 -> 7 -> 13 -> 16 -> 13 -> 16 -> 13 -> 16 -> ...
3 -> 9 -> 9 -> 9 -> 9 -> 9 -> 9 -> 9 -> 9 -> ...
4 -> 7 -> 13 -> 16 -> 13 -> 16 -> 13 -> 16 -> 13 -> ...
5 -> 7 -> 13 -> 16 -> 13 -> 16 -> 13 -> 16 -> 13 -> ...
6 -> 9 -> 9 -> 9 -> 9 -> 9 -> 9 -> 9 -> 9 -> ...
7 -> 13 -> 16 -> 13 -> 16 -> 13 -> 16 -> 13 -> 16 -> ...
- R. J. Mathar, Jul 08 2012
MAPLE
read("transforms"):
A004159 := proc(n)
digsum(n^2) ;
end proc: # R. J. Mathar, Jul 08 2012
MATHEMATICA
a004159[n_Integer] := Apply[Plus, IntegerDigits[n^2]]; Table[
a004159[n], {n, 0, 100}] (* Michael De Vlieger, Jul 21 2014 *)
Total[IntegerDigits[#]]&/@(Range[0, 100]^2) (* Harvey P. Dale, Feb 03 2019 *)
PROG
(Haskell)
a004159 = a007953 . a000290 -- Reinhard Zumkeller, Apr 12 2014
(Python)
def A004159(n):
return sum(int(d) for d in str(n*n)) # Chai Wah Wu, Sep 03 2014
(PARI) A004159(n)=sumdigits(n^2) \\ M. F. Hasler, Sep 23 2014
CROSSREFS
Cf. A240752 (first differences), A071317 (partial sums).
Cf. A062685 (smallest square with digit sum n, or 0 if no such square exists).
KEYWORD
nonn,base
STATUS
approved
a(n) is the smallest n-gonal number whose sum of digits is n.
+10
1
3, 4, 5, 6, 7, 8, 9, 370, 506, 156, 238, 671, 726, 88, 836, 585, 775, 7337, 5268, 8149, 8555, 8961, 9367, 9773, 15786, 9856, 91964, 65757, 89428, 179960, 47796, 108979, 197945, 86976, 467974, 998516, 259896, 598792, 1737788, 869649, 969991, 1985984, 998676, 3798496, 7979546, 5877696
OFFSET
3,1
LINKS
Eric Weisstein's World of Mathematics, Polygonal Number
EXAMPLE
370 is the smallest 10-gonal number with digit sum 10, so a(10) = 370.
MATHEMATICA
p[n_, k_] := (n - 2)*k*(k - 1)/2 + k; a[n_] := Module[{k = 1, pk}, While[Plus @@ IntegerDigits[pk = p[n, k]] != n, k++]; pk]; Array[a, 45, 3] (* Amiram Eldar, Dec 10 2022 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Ilya Gutkovskiy, Dec 10 2022
STATUS
approved

Search completed in 0.004 seconds