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.

A135210 Numbers n such that Sum_digits(n) + Sum_digits(n+1) = Sum_digits(2*n+1).

This page as a plain text file.
%I A135210 #12 Jul 06 2020 18:30:45
%S A135210 0,1,2,3,4,9,10,11,12,13,14,19,20,21,22,23,24,29,30,31,32,33,34,39,40,
%T A135210 41,42,43,44,49,99,100,101,102,103,104,109,110,111,112,113,114,119,
%U A135210 120,121,122,123,124,129,130,131,132,133,134,139,140,141,142,143,144,149
%N A135210 Numbers n such that Sum_digits(n) + Sum_digits(n+1) = Sum_digits(2*n+1).
%H A135210 G. C. Greubel, <a href="/A135210/b135210.txt">Table of n, a(n) for n = 1..2000</a>
%e A135210 n=19 -> Sum_digits(19)=10; Sum_digits(20)=2 -> 10+2=12; Sum_digits(19+20)=12
%p A135210 P:=proc(n) local a,b,i,k,w,y,x; for i from 0 by 1 to n do w:=0; k:=i; while k>0 do w:=w+k-(trunc(k/10)*10); k:=trunc(k/10); od; x:=0; k:=i+1; while k>0 do x:=x+k-(trunc(k/10)*10); k:=trunc(k/10); od; y:=0; k:=2*i+1; while k>0 do y:=y+k-(trunc(k/10)*10); k:=trunc(k/10); od; if w+x=y then print(i); fi; od; end: P(1000);
%t A135210 Select[Range[0,1000], Total[IntegerDigits[#]] + Total[IntegerDigits[# + 1]] == Total[IntegerDigits[ 2*# + 1]] &] (* _G. C. Greubel_, Oct 01 2016 *)
%o A135210 (PARI) is(n)=my(s=sumdigits,t); t=s(2*n+1)-s(n); t>0 && t==s(n+1) \\ _Charles R Greathouse IV_, Oct 01 2016
%Y A135210 Cf. A127273.
%K A135210 easy,nonn,base
%O A135210 1,3
%A A135210 _Paolo P. Lava_ and _Giorgio Balzarotti_, Dec 18 2007