login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A065816 Numbers k such that the alternating sum of digits of k^2 is 0. 2

%I #13 Dec 19 2021 16:54:43

%S 11,22,33,55,66,88,99,110,121,132,165,198,209,220,231,242,264,319,330,

%T 374,385,429,451,462,484,495,506,517,528,550,561,583,605,616,649,660,

%U 671,682,715,737,748,814,836,847,880,891,902,913,924,935,957,990

%N Numbers k such that the alternating sum of digits of k^2 is 0.

%H Harry J. Smith, <a href="/A065816/b065816.txt">Table of n, a(n) for n = 1..1000</a>

%t f[n_] := Block[ {d = Reverse[ IntegerDigits[ n]], k = l = 1, s = 0}, l = Length[d]; While[ k <= l, s = s - (-1)^k*d[[k]]; k++ ]; Return[s]]; Select[ Range[10^3], f[ #^2] == 0 & ]

%t Select[Range[1000],Total[Times@@@Partition[Riffle[IntegerDigits[#^2],{1,-1},{2,-1,2}],2]]==0&] (* _Harvey P. Dale_, Dec 19 2021 *)

%o (PARI) SumAD(x)= { local(a=1, s=0); while (x>9, s+=a*(x-10*(x\10)); x\=10; a=-a); return(s + a*x) } { n=0; for (m=1, 10^9, if (SumAD(m^2) == 0, write("b065816.txt", n++, " ", m); if (n==1000, return)) ) } \\ _Harry J. Smith_, Oct 31 2009

%Y Cf. A065796.

%K nonn,base

%O 1,1

%A _Robert G. Wilson v_, Dec 06 2001

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 18:58 EDT 2024. Contains 371798 sequences. (Running on oeis4.)