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.

A281823 Least number k such that (k-n)^2 contains k as a substring.

This page as a plain text file.
%I A281823 #17 Apr 13 2021 11:49:01
%S A281823 1,12,1,16,108,1,4,2,116,3,1,1,1,1,1,1,4,2,2,2,1,3,1,9,4,2,4,2,5,2,1,
%T A281823 6,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,1,2,2,1,2,1,2,2,1,2,1,3,2,1,3,1,2,3,
%U A281823 3,3,2,4,3,1,4,1,1,4,2,3,2,4,2,1,2,1,4,2,6
%N A281823 Least number k such that (k-n)^2 contains k as a substring.
%H A281823 Paolo P. Lava, <a href="/A281823/b281823.txt">Table of n, a(n) for n = 0..10000</a>
%e A281823 a(1) = 12 because (12 - 1)^2 = 11^2 = 121 contains 12 as a substring and it is the least number with this property.
%p A281823 with(numtheory): P:= proc(q) local a,b,d,j,k,n,ok;
%p A281823 for n from 0 to q do for k from 1 to q do a:=ilog10(k)+1; b:=(n-k)^2; d:=ilog10((k-n)^2)-ilog10(k)+1;
%p A281823 ok:=0; for j from 1 to d do if k=(b mod 10^a) then ok:=1; break; else b:=trunc(b/10); fi; od;
%p A281823 if ok=1 then print(k); break; fi; od; od; end: P(10^6);
%t A281823 nk[n_]:=Module[{k=1},While[SequenceCount[IntegerDigits[(k-n)^2],IntegerDigits[ k]]==0,k++];k]; Array[lnk,90,0] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, Apr 13 2021 *)
%Y A281823 Cf. A018834, A281822.
%K A281823 nonn,base,easy
%O A281823 0,2
%A A281823 _Paolo P. Lava_, Jan 31 2017
%E A281823 Typo in definition corrected by _Harvey P. Dale_, Feb 27 2017.
%E A281823 Entries, Maple code and b-file corrected at the suggestion of _Harvey P. Dale_, Feb 28 2017.