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.

Showing 1-3 of 3 results.

A252629 a(n) = A064735(n) - A000040(n).

Original entry on oeis.org

21, 10, 48, 10, 102, 100, 156, 172, 200, 200, 100, 100, 200, 388, 300, 300, 300, 400, 100, 200, 100, 100, 200, 300, 100, 912, 928, 5000, 982, 2000, 1150, 1188, 1236, 1260, 1344, 1000, 1414, 1000, 3000, 1560, 2000, 1000, 1722, 1000, 1776, 1794, 1900, 1000, 2046, 1000, 2100, 2000
Offset: 1

Views

Author

Zak Seidov, Dec 19 2014

Keywords

Crossrefs

Programs

  • Mathematica
    p = 1; s = {}; m = 100; Do[p = NextPrime[p]; idp = IntegerDigits[p]; le = Length[idp]; q = p; Label[1]; q = NextPrime[q]; par = Partition[IntegerDigits[q], le, 1]; If[MemberQ[par, idp], AppendTo[s, q - p]; Goto[2], Goto[1]]; Label[2], {m}];s(*for first m terms*)

A100844 Smallest m greater than n such that m^2 contains n^2 in its decimal representation.

Original entry on oeis.org

10, 4, 7, 7, 13, 15, 19, 43, 42, 41, 90, 110, 38, 130, 140, 35, 160, 170, 57, 190, 80, 210, 220, 227, 240, 75, 260, 223, 279, 196, 70, 219, 320, 330, 340, 285, 360, 370, 380, 390, 400, 410, 343, 136, 440, 205, 460, 470, 480, 490, 150, 510, 520, 530, 540, 305, 481
Offset: 0

Views

Author

Reinhard Zumkeller, Jan 14 2005

Keywords

Comments

a(n) <= 10*n; a(A102576(n)) < 10*A102576(n), a(A102577(n)) = 10*A102577(n). - Reinhard Zumkeller, Jan 15 2005

Examples

			n=3: (3+1)^2 = 16, (3+2)^2 = 25 and (3+3)^2 = 36 do not contain 9 = 3^2, but 7^2 = 49 contains 9, therefore a(3) = 7.
		

Crossrefs

Programs

  • Mathematica
    p = -1; s = {}; m = 100; Do[p = p + 1; idp = IntegerDigits[p^2]; le = Length[idp]; q = p; Label[1]; q = q + 1; par = Partition[IntegerDigits[q^2], le, 1]; If[MemberQ[par, idp], AppendTo[s, q]; Goto[2], Goto[1]]; Label[2], {m}]; s (* Zak Seidov, Dec 19 2014 *)
    f[n_] := Block[{sidn = ToString[n^2], k = n + 1}, While[ StringPosition[ ToString[k^2], sidn] == {}, k++]; k]; Array[f, 60, 0] (* Robert G. Wilson v, Dec 19 2014 *)
  • Python
    def a(n):
        s, m = str(n*n), n+1
        while s not in str(m*m): m += 1
        return m
    print([a(n) for n in range(57)]) # Michael S. Branicky, Oct 04 2021

A381606 a(n) is the smallest prime number greater than n that contains n as a substring of its digits.

Original entry on oeis.org

101, 11, 23, 13, 41, 53, 61, 17, 83, 19, 101, 113, 127, 113, 149, 151, 163, 173, 181, 191, 1201, 211, 223, 223, 241, 251, 263, 127, 281, 229, 307, 131, 1321, 233, 347, 353, 367, 137, 383, 139, 401, 241, 421, 431, 443, 457, 461, 347, 487, 149, 503, 151, 521, 353, 541
Offset: 0

Views

Author

Joost de Winter, Mar 01 2025

Keywords

Examples

			The first prime number greater than 0 that contains "0" is 101, so a(0) = 101.
The first prime number greater than 1 that contains "1" is 11, so a(1) = 11.
The first prime number greater than 2 that contains "2" is 23, so a(2) = 23.
		

Crossrefs

Programs

  • MATLAB
    \\ See De Winter link
    
  • Maple
    f:= proc(n) local m,d,d1,x,y,L;
      m:= length(n);
      for d from 1 do
        L:= sort([seq(10^d * n + x, x = 1 .. 10^d-1, 2),
                 seq(n+10^m*x, x=10^(d-1) .. 10^d-1),
                 seq(seq(seq(10^d1*n + x + 10^(m+d1)*y, x=1 .. 10^d1-1,2),y=10^(d-d1-1) .. 10^(d-d1)-1),d1=1..d-1)]);
        for x in L do if isprime(x) then return x fi od
      od
    end proc:
    f(0):= 101:
    map(f, [$0..100]); # Robert Israel, Mar 02 2025
  • Mathematica
    a[n_] := Module[{p = NextPrime[n + 1], s = ToString[n]}, While[! StringContainsQ[ToString[p], s], p = NextPrime[p]]; p]; Array[a, 100, 0] (* Amiram Eldar, Mar 03 2025 *)
  • PARI
    a(n) = my(p=nextprime(n+1), s=Str(n)); while (#strsplit(Str(p), s) < 2, p = nextprime(p+1)); p; \\ Michel Marcus, Mar 01 2025
    
  • PARI
    \\ See Corneth link

Formula

a(n) > 2n. For large enough n, a(n) < n^5 by the strongest known version of Linnik's theorem. - Charles R Greathouse IV, Mar 01 2025
Showing 1-3 of 3 results.