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.

A228381 Unabridged sub-Kaprekar numbers (A118936, but allowing powers of ten).

This page as a plain text file.
%I A228381 #17 Jan 04 2025 07:35:39
%S A228381 10,11,78,100,101,287,364,1000,1001,1078,1096,1287,1364,10000,10001,
%T A228381 11096,18183,100000,100001,118183,336634,1000000,1000001,1336634,
%U A228381 2727274,10000000,10000001,12727274,19138757,23529412,25974026,97744361,100000000,100000001,120879122
%N A228381 Unabridged sub-Kaprekar numbers (A118936, but allowing powers of ten).
%C A228381 Square roots of A228103.
%C A228381 Excluding powers-of-ten and powers-of-ten-plus-one, what remains may be arranged into pairs (x,y), y>x, where y-x is a power of ten. The x terms correspond to A118938.
%H A228381 Hans Havermann, <a href="/A228381/b228381.txt">Table of n, a(n) for n = 1..1016</a>
%e A228381 10^2 = (10-0)^2.
%e A228381 11^2 = (12-1)^2.
%e A228381 78^2 = (6-084)^2.
%t A228381 k=3; While[k<10^8, k++; s=k^2; d=IntegerDigits[s]; l=Length[d]; Do[a=FromDigits[Take[d, {1, i}]]; b=FromDigits[Take[d, {i+1, l}]]; If[k==Abs[a-b], Print[k]], {i, l-1}]]
%o A228381 (PARI) lista(nn) = my(d, s, t=1, v=List([])); while(t<nn^2, t*=10; d=[f[1]^f[2]|f<-factor(t+1)~]; forvec(x=vector(#d, i, [0, 1]), s=lift(chinese(vector(#d, i, Mod((-1)^x[i]*t/2, d[i])))); if(2*s<t, s+=t+1); if(s^2<t*(5*t/4+1), listput(v, s-t/2); listput(v, s+t/2)))); Set(select(x->(x>1&&x<=nn), v)); \\ _Jinyuan Wang_, Jan 02 2025
%Y A228381 Cf. A045913, A118936, A118938, A228103.
%K A228381 nonn,base
%O A228381 1,1
%A A228381 _Hans Havermann_, Aug 21 2013