%I #66 Feb 21 2024 10:31:21
%S 1,4,7,9,10,13,16,18,19,22,25,27,28,31,34,36,37,40,43,45,46,49,52,54,
%T 55,58,61,63,64,67,70,72,73,76,79,81,82,85,88,90,91,94,97,99,100,103,
%U 106,108,109,112,115,117,118,121,124,126,127,130,133,135,136,139,142
%N Numbers with digital root 1, 4, 7 or 9.
%C All squares are members (see A070433).
%C May also be defined as: possible sums of digits of squares. - _Zak Seidov_, Feb 11 2008
%C First differences are periodic: 3, 3, 2, 1, 3, 3, 2, 1, 3, 3, 2, 1, 3, 3, 2, 1, 3, 3, 2, 1, 3, 3, 2, 1, 3, 3, 2, 1, ... - _Zak Seidov_, Feb 11 2008
%C Minimal n with corresponding sum-of-digits(n^2) are: 1, 2, 4, 3, 8, 7, 13, 24, 17, 43, 67, 63, 134, 83, 167, 264, 314, 313, 707, 1374, 836, 1667, 2236, 3114, 4472, 6833, 8167, 8937, 16667, 21886, 29614, 60663, 41833, 74833, 89437, 94863, 134164, 191833.
%C a(n) is the set of all m such that 9k+m can be a perfect square (quadratic residues of 9 including the trivial case of 0). - _Gary Detlefs_, Mar 19 2010
%C From _Klaus Purath_, Feb 20 2023: (Start)
%C The sum of digits of any term belongs to the sequence. Also the products of any terms belong to the sequence.
%C This is the union of A017173, A017209, A017245 and A008591.
%C Positive integers of the forms x^2 + (2*m+1)*x*y + (m^2+m-2)*y^2, for integers m.
%C This sequence is closed under multiplication. (End)
%H R. J. Mathar, <a href="/A056991/b056991.txt">Table of n, a(n) for n = 1..22222</a>
%H H. I. Okagbue, M. O. Adamu, S. A. Iyase, and A. A. Opanuga, <a href="https://www.i-scholar.in/index.php/indjst/article/view/75271/65577">Sequence of Integers Generated by Summing the Digits of their Squares</a>, Indian Journal of Science and Technology, Vol 8(15), DOI: 10.17485/ijst/2015/v8i15/69912, July 2015.
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/SquareNumber.html">Square Number</a>
%H <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,0,1,-1).
%F From _R. J. Mathar_, Feb 14 2008: (Start)
%F O.g.f.: x*(2x+1)*(x^2+x+1)/((-1+x)^2*(x+1)*(x^2+1)).
%F a(n) = a(n-4) + 9. (End)
%F a(n) = 3*(n - floor(n/4)) - (3 - i^n - (-i)^n - (-1)^n)/2, where i = sqrt(-1). - _Gary Detlefs_, Mar 19 2010
%F a(n) = a(n-1)+a(n-4)-a(n-5). - _Wesley Ivan Hurt_, May 27 2021
%F a(n) = 3*n - floor(n/4) - 2*floor((n+3)/4). - _Ridouane Oudra_, Jan 21 2024
%F E.g.f.: (cos(x) + (9*x - 1)*cosh(x) - 3*sin(x) + (9*x - 2)*sinh(x))/4. - _Stefano Spezia_, Feb 21 2024
%p seq( 3*(n-floor(n/4)) - (3-I^n-(-I)^n-(-1)^n)/2, n=1..63); # _Gary Detlefs_, Mar 19 2010
%t LinearRecurrence[{1,0,0,1,-1},{1,4,7,9,10},70] (* _Harvey P. Dale_, Aug 29 2015 *)
%o (PARI) forstep(n=1,1e3,[3,3,2,1],print1(n", ")) \\ _Charles R Greathouse IV_, Sep 21 2012
%Y Cf. A000290, A008591, A017173, A017209, A017245, A056992, A070433.
%Y For complement see A268226.
%K nonn,base,easy
%O 1,2
%A _Eric W. Weisstein_
%E Edited by _N. J. A. Sloane_, May 16 2008 at the suggestion of _R. J. Mathar_