%I #80 Dec 05 2018 15:43:02
%S 0,1,5,25,40,65,80,160,225,385,400,560,625,785,800,960,1185,2560,2625,
%T 4000,5185,6560,6625,8000,9185,9376,10625,26560,37185,40000,50625,
%U 66560,77185,80000,90625,226560,317185,400000,490625,626560,717185,800000
%N Square pyramorphic numbers: integers m such that the sum of the first m squares (A000330) ends in m.
%C From _Robert Dawson_, Apr 04 2018: (Start)
%C This sequence is the union of the following twelve subsequences.
%C Terms in <angle brackets> have fewer than d digits: they are pyramorphic, and always appear elsewhere, as an earlier term in the same sequence or in a related sequence. Dashes replace solutions to the congruences for which the inequalities, or other conditions proving pyramorphicity, are not satisfied; these are not part of the subsequences.
%C (i) a(d) := 4 * 10^(d-1) for d >= 2:
%C (-, 40,400,4000,40000,400000,...)
%C (ii) 2a(d) for d >= 2:
%C (-, 80,800,8000,80000,800000,...)
%C (iii) b(d) such that 2^(d+1)|b(d), 5^d|b(d)-1, b(d) < 10^d:
%C (-,-,-,9376,-,-,7109376,-,...)
%C (iv) c(d) such that 2^(d+1)|c(d), 5^(d-1)|2c(d)+5, c(d) < 4*10^(d-1):
%C (0,<0>,160,2560,26560,226560,<226560>,12226560,...)
%C (v) c(d) + a(d) for d >= 2:
%C (-,40,560,6560,66560,626560,42265609,41226560,...)
%C (vi) c(d) + 2a(d) for d >= 2, when this is less than 10^d:
%C (-, 80,960,-,-,-,8226560,81226560,...)
%C (vii) c'(d) such that 2^(d+1)|c'(d)-1, 5^(d-1)|2c'(d)+5, c'(d) < 4*10^(d-1):
%C (1,25,385,1185,37185,317185,1117185,25117185,...)
%C (viii)c'(d) + a(d) for d >= 2:
%C (-,65,785,5185,77185,717185,5117185,65117185,...)
%C (ix) c'(d) + 2a(d) for d >= 2, when this is less than 10^d:
%C (-,-,-,9185,-,-,9117185,-,...)
%C (x) c"(d) such that 2^(d+1)|c"(d)-1, 5^(d-1)|c"(d), c"(d) < 4*10^(d-1):
%C (5,25,225,2625,10625,<90625>,<890625>,12890625,...)
%C (xi) c"(d) + a(d) for d >= 2:
%C (-,65,625,6625,50625,490625,4890625,52890626,...)
%C (xii) c"(d) + 2a(d) for d >= 2, when this is less than 10^d:
%C (-,-,-,-,90625,890625,8890625,92890625,...)
%C For d >= 3 the d-th terms of these sequences are always distinct.
%C For d > 3 there are at least eight and at most eleven square pyramorphic numbers with d digits (not including leading zeros). The minimum is first achieved for d=6; the maximum is first achieved for d=49.
%C (End)
%D C. A. Pickover, Wonders of Numbers, Chap. 65, Oxford Univ. Press NY 2000; pp. 158-160.
%H Giovanni Resta, <a href="/A093534/b093534.txt">Table of n, a(n) for n = 1..9000</a> (terms > 10^11 generated according to _Robert Dawson_'s comment)
%H Robert Dawson, <a href="https://www.emis.de/journals/JIS/VOL21/Dawson/dawson6.html">On Some Sequences Related to Sums of Powers</a>, J. Int. Seq., Vol. 21 (2018), Article 18.7.6.
%t l = {0}; s = 0; Do[s = s + n^2; If[ Mod[s, 10^Floor[ Log[10, n] + 1]] == n, AppendTo[l, n]], {n, 10^6}]; l (* _Robert G. Wilson v_, May 24 2004 *)
%o (PARI) isok(n) = frac((n*(n+1)*(2*n+1)/6 - n)/10^#Str(n)) == 0; \\ _Michel Marcus_, Aug 01 2018
%Y A060204 gives the corresponding sums of squares. Cf. A000330.
%K nonn,base
%O 1,3
%A _Lekraj Beedassy_, May 14 2004
%E More terms from _Robert G. Wilson v_, May 24 2004
%E Term corrected (6025 -> 6625) by _Robert Dawson_, Jul 31 2018
%E 0 inserted by _David A. Corneth_, Aug 02 2018