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!)
A240754 Numbers k with digit_sum(k*k) - 1 = digit_sum((k+1)*(k+1)). 4

%I #7 Aug 26 2021 07:03:57

%S 8,26,53,98,107,143,161,170,179,188,224,233,242,260,269,278,287,296,

%T 350,368,386,404,413,431,449,476,494,503,539,548,557,584,593,629,638,

%U 647,674,683,737,746,773,791,818,827,863,872,908,926,944,998,1007,1043

%N Numbers k with digit_sum(k*k) - 1 = digit_sum((k+1)*(k+1)).

%C A240752(a(n)) = 0.

%H Reinhard Zumkeller, <a href="/A240754/b240754.txt">Table of n, a(n) for n = 1..10000</a>

%o (Haskell)

%o import Data.List (elemIndices)

%o a240754 n = a240754_list !! (n-1)

%o a240754_list = elemIndices (-1) a240752_list

%o (Python)

%o def ds(n): return sum(map(int, str(n)))

%o def ok(n): return ds(n*n) - 1 == ds((n+1)*(n+1))

%o print(list(filter(ok, range(1044)))) # _Michael S. Branicky_, Aug 26 2021

%Y Cf. A202089, A239878, A004159, A007953, A000290.

%K nonn,base

%O 1,1

%A _Reinhard Zumkeller_, Apr 12 2014

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 15:34 EDT 2024. Contains 371794 sequences. (Running on oeis4.)