cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A239878 Numbers k with digit_sum(k*k) + 1 = digit_sum((k+1)*(k+1)).

This page as a plain text file.
%I A239878 #32 Jun 25 2025 14:48:56
%S A239878 0,18,27,36,45,72,81,108,153,198,216,225,243,252,270,297,306,342,369,
%T A239878 396,423,441,450,477,486,495,504,513,522,549,558,576,603,630,639,657,
%U A239878 693,702,729,747,756,783,801,846,891,918,954,963,972,981
%N A239878 Numbers k with digit_sum(k*k) + 1 = digit_sum((k+1)*(k+1)).
%C A239878 All terms are divisible by 9.
%C A239878 The number of terms is unlimited: n = 3*10^z + 6, i.e., digit_sum(n*n) + 1 = 27 + 1 = 28 = digit_sum((n+1)*(n+1)). - _Reiner Moewald_, Apr 20 2014
%H A239878 Reiner Moewald, <a href="/A239878/b239878.txt">Table of n, a(n) for n = 1..4067</a>
%F A239878 A240752(a(n)) = 1. - _Reinhard Zumkeller_, Apr 12 2014
%o A239878 (Python)
%o A239878 def digit_Sum(n):
%o A239878    integerString = str(n)
%o A239878    digit_Sum=0
%o A239878    for digitLetter in integerString:
%o A239878       digit_Sum = digit_Sum + int(digitLetter)
%o A239878    return digit_Sum
%o A239878 count = 0;
%o A239878 for i in range(20000):
%o A239878    if(digit_Sum(i*i) + 1 == digit_Sum((i+1)*(i+1))):
%o A239878       count = count +1
%o A239878       print(count,"   ",i)
%o A239878 (PARI) isok(n) = (sumdigits(n^2) + 1) == sumdigits((n+1)^2); \\ _Michel Marcus_, Apr 06 2014
%o A239878 (Haskell)
%o A239878 import Data.List (elemIndices)
%o A239878 a239878 n = a239878_list !! (n-1)
%o A239878 a239878_list = elemIndices 1 a240752_list
%o A239878 -- _Reinhard Zumkeller_, Apr 12 2014
%Y A239878 Cf. A202089, A240752, A240754, A004159, A007953, A000290.
%K A239878 nonn,base
%O A239878 1,2
%A A239878 _Reiner Moewald_, Mar 28 2014