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-8 of 8 results.

A076497 Number of primes corresponding to n-th primeval number A072857(n).

Original entry on oeis.org

0, 1, 3, 4, 5, 7, 11, 14, 19, 21, 26, 29, 31, 33, 35, 41, 53, 55, 60, 64, 89, 96, 106, 122, 153, 188, 248, 311, 349, 402, 421, 547, 705, 812, 906, 1098, 1162, 1268, 1662, 1738, 1953, 2418, 2920, 3133, 3457, 4483, 4517, 4917, 5174, 5953, 6552, 6799, 8938, 10219
Offset: 1

Views

Author

Lekraj Beedassy, Nov 08 2002

Keywords

Examples

			a(3) = 3 because the primeval number A072857(3) = 13 can be used to create 3 prime numbers, namely 3, 13 and 31.
a(6) = 7 because the primeval number A072857(7) = 113 can be used to create 7 prime numbers, namely 3, 11, 13, 31, 113, 131 and 311. (The two primes 13 and 31 can be obtained in 2 ways, therefore A075053(113) = 9.)
		

Crossrefs

Programs

  • Mathematica
    Needs["DiscreteMath`Combinatorica`"]; f[n_] := Block[{a = Drop[ Sort[ Subsets[ IntegerDigits[n]]], 1], b = c = {}, k = 1, l}, l = Length[a] + 1; While[k < l, b = Append[b, Permutations[ a[[k]] ]]; k++ ]; b = Union[ Flatten[b, 1]]; l = Length[b] + 1; k = 1; While[k < l, c = Append[c, FromDigits[ b[[k]] ]]; k++ ]; Count[ PrimeQ[ Union[c]], True]]; d = -1; Do[ b = f[n]; If[b > d, Print[b]; d = b], {n, 1, 10^6}]

Formula

a(n) = A039993(A072857(n)). - M. F. Hasler, Mar 12 2014

Extensions

Edited and extended by Robert G. Wilson v, Nov 12 2002
Links fixed by Charles R Greathouse IV, Aug 13 2009
a(40)-a(54) from Giovanni Resta, Nov 06 2013

A080096 a(1) = a(2) = 1, a(3) = 2, thereafter a(n) = abs(a(n-1) - a(n-2) - a(n-3)).

Original entry on oeis.org

1, 1, 2, 0, 3, 1, 2, 2, 1, 3, 0, 4, 1, 3, 2, 2, 3, 1, 4, 0, 5, 1, 4, 2, 3, 3, 2, 4, 1, 5, 0, 6, 1, 5, 2, 4, 3, 3, 4, 2, 5, 1, 6, 0, 7, 1, 6, 2, 5, 3, 4, 4, 3, 5, 2, 6, 1, 7, 0, 8, 1, 7, 2, 6, 3, 5, 4, 4, 5, 3, 6, 2, 7, 1, 8, 0, 9, 1, 8, 2, 7, 3, 6, 4, 5, 5, 4, 6, 3, 7, 2, 8, 1, 9, 0, 10, 1, 9, 2, 8, 3, 7, 4, 6, 5
Offset: 1

Views

Author

Benoit Cloitre, Jan 28 2003

Keywords

Crossrefs

Programs

  • Haskell
    a080096 n = a080096_list !! (n-1)
    a080096_list = 1 : 1 : 2 : zipWith3 (\u v w -> abs (w - v - u))
                   a080096_list (tail a080096_list) (drop 2 a080096_list)
    -- Reinhard Zumkeller, Oct 11 2014
    
  • Magma
    m:=120;
    A080096:=[n le 3 select Floor((n+1)/2) else Abs(Self(n-1) - Self(n-2) - Self(n-3)): n in [1..m+5]];
    [A080096[n]: n in [1..m]]; // G. C. Greubel, Sep 11 2024
    
  • Mathematica
    nxt[{a_,b_,c_}]:={b,c,Abs[c-b-a]}; NestList[nxt,{1,1,2},110][[All,1]] (* Harvey P. Dale, Nov 14 2021 *)
  • PARI
    a(n)=local(k,m); if(n<1,0,k=sqrtint(n+4); m=n+4-k^2; if(m%2,m\2+1,k-m\2))
    
  • SageMath
    @CachedFunction
    def a(n): # a = A080096
        if n<4: return int((n+1)//2)
        else: return abs(a(n-1)-a(n-2)-a(n-3))
    [a(n) for n in range(1,101)] # G. C. Greubel, Sep 11 2024

Formula

For n>=3 Max( a(k) : 1<=k<=n ) = floor ( sqrt(n+4)).
Special cases: a(n^2 + 4*n - 1) = 0 and a(n^2 - 4) = n.
a(A028557(n)) = a(A028557(n+1)).
Sum_{k=(n-1)^2 .. n^2} a(k) = n^2.

A077653 a(1)=1, a(2)=2, a(3)=2, a(n) = abs(a(n-1) - a(n-2) - a(n-3)).

Original entry on oeis.org

1, 2, 2, 1, 3, 0, 4, 1, 3, 2, 2, 3, 1, 4, 0, 5, 1, 4, 2, 3, 3, 2, 4, 1, 5, 0, 6, 1, 5, 2, 4, 3, 3, 4, 2, 5, 1, 6, 0, 7, 1, 6, 2, 5, 3, 4, 4, 3, 5, 2, 6, 1, 7, 0, 8, 1, 7, 2, 6, 3, 5, 4, 4, 5, 3, 6, 2, 7, 1, 8, 0, 9, 1, 8, 2, 7, 3, 6, 4, 5, 5, 4, 6, 3, 7, 2, 8, 1, 9, 0, 10, 1, 9, 2, 8, 3, 7, 4, 6, 5, 5, 6, 4, 7
Offset: 1

Views

Author

Benoit Cloitre, Dec 02 2002

Keywords

Comments

Conjecture : let z(1)=x; z(2)=y; z(3)= z; z(n)=abs(z(n-1)-z(n-2)-z(n-3)) if z(n) is unbounded (i.e. x,y,z are such that z(n) doesn't reach a cycle of length 2), then there are 2 integers n(x,y,z) and w(x,y,z) such that M(n) = floor(sqrt(n+w(x,y,z))) for n>n(,x,y,z) where M(n) = Max ( a(k) : 1<=k<=n ). As example : w(1,2,2)=9 n(1,2,2)=4; w(1,2,4)=29 n(1,2,4)=4; w(1,2,8)=157 n(1,2,8)=9

Crossrefs

Programs

  • Haskell
    a077653 n = a077653_list !! (n-1)
    a077653_list = 1 : 2 : 2 : zipWith3 (\u v w -> abs (w - v - u))
                   a077653_list (tail a077653_list) (drop 2 a077653_list)
    -- Reinhard Zumkeller, Oct 11 2014
    
  • Magma
    m:=120;
    A077653:=[n le 3 select Floor((n+2)/2) else Abs(Self(n-1) - Self(n-2) - Self(n-3)): n in [1..m+5]];
    [A077653[n]: n in [1..m]]; // G. C. Greubel, Sep 11 2024
    
  • Mathematica
    nxt[{a_,b_,c_}]:={b,c,Abs[c-b-a]}; NestList[nxt,{1,2,2},110][[All,1]] (* Harvey P. Dale, Sep 01 2020 *)
  • SageMath
    @CachedFunction
    def a(n): # a = A077653
        if n<4: return int((n+2)//2)
        else: return abs(a(n-1)-a(n-2)-a(n-3))
    [a(n) for n in range(1,101)] # G. C. Greubel, Sep 11 2024

Formula

a(n)/sqrt(n) is bounded. More precisely, let M(n) = Max ( a(k) : 1<=k<=n ); then M(n)= floor(sqrt(n+9)) for n>4

A079623 a(1) = a(2) = 1, a(3)=4, a(n) = abs(a(n-1) - a(n-2) - a(n-3)).

Original entry on oeis.org

1, 1, 4, 2, 3, 3, 2, 4, 1, 5, 0, 6, 1, 5, 2, 4, 3, 3, 4, 2, 5, 1, 6, 0, 7, 1, 6, 2, 5, 3, 4, 4, 3, 5, 2, 6, 1, 7, 0, 8, 1, 7, 2, 6, 3, 5, 4, 4, 5, 3, 6, 2, 7, 1, 8, 0, 9, 1, 8, 2, 7, 3, 6, 4, 5, 5, 4, 6, 3, 7, 2, 8, 1, 9, 0, 10, 1, 9, 2, 8, 3, 7, 4, 6, 5, 5, 6, 4, 7, 3, 8, 2, 9, 1, 10, 0, 11, 1, 10, 2, 9, 3, 8
Offset: 1

Views

Author

Benoit Cloitre, Jan 30 2003

Keywords

Crossrefs

Programs

  • Haskell
    a079623 n = a079623_list !! (n-1)
    a079623_list = 1 : 1 : 4 : zipWith3 (\u v w -> abs (w - v - u))
                   a079623_list (tail a079623_list) (drop 2 a079623_list)
    -- Reinhard Zumkeller, Oct 11 2014
    
  • Magma
    m:=120;
    A079623:=[n le 3 select 4^Floor((n-1)/2) else Abs(Self(n-1) - Self(n-2) - Self(n-3)): n in [1..m+5]];
    [A079623[n]: n in [1..m]]; // G. C. Greubel, Sep 11 2024
    
  • Mathematica
    nxt[{a_,b_,c_}]:={b,c,Abs[c-b-a]}; NestList[nxt,{1,1,4},110][[All,1]] (* Harvey P. Dale, Aug 12 2020 *)
  • SageMath
    @CachedFunction
    def a(n): # a = A079623
        if n<4: return 4^((n-1)//2)
        else: return abs(a(n-1)-a(n-2)-a(n-3))
    [a(n) for n in range(1,101)] # G. C. Greubel, Sep 11 2024

Formula

a(n*(n-10)) = 0.
Max( a(k) : 1<=k<=n) = floor(sqrt(n+24)).

A079624 a(1) = a(2) = 1, a(3) = 6, a(n) = abs(a(n-1) - a(n-2) - a(n-3)).

Original entry on oeis.org

1, 1, 6, 4, 3, 7, 0, 10, 3, 7, 6, 4, 9, 1, 12, 2, 11, 3, 10, 4, 9, 5, 8, 6, 7, 7, 6, 8, 5, 9, 4, 10, 3, 11, 2, 12, 1, 13, 0, 14, 1, 13, 2, 12, 3, 11, 4, 10, 5, 9, 6, 8, 7, 7, 8, 6, 9, 5, 10, 4, 11, 3, 12, 2, 13, 1, 14, 0, 15, 1, 14, 2, 13, 3, 12, 4, 11, 5, 10, 6, 9, 7, 8, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3
Offset: 1

Views

Author

Benoit Cloitre, Jan 30 2003

Keywords

Crossrefs

Programs

  • Haskell
    a079624 n = a079624_list !! (n-1)
    a079624_list = 1 : 1 : 6 : zipWith3 (\u v w -> abs (w - v - u))
                   a079624_list (tail a079624_list) (drop 2 a079624_list)
    -- Reinhard Zumkeller, Oct 11 2014
    
  • Magma
    m:=120;
    A079624:=[n le 3 select 6^Floor((n-1)/2) else Abs(Self(n-1) - Self(n-2) - Self(n-3)): n in [1..m+5]];
    [A079624[n]: n in [1..m]]; // G. C. Greubel, Sep 11 2024
    
  • Mathematica
    a[n_]:= a[n]= If[n<4, 6^Floor[(n-1)/2], Abs[a[n-1] -a[n-2] -a[n-3]]];
    Table[a[n], {n,100}] (* G. C. Greubel, Sep 11 2024 *)
  • SageMath
    @CachedFunction
    def a(n): # a = A079624
        if n<4: return 6^((n-1)//2)
        else: return abs(a(n-1)-a(n-2)-a(n-3))
    [a(n) for n in range(1,101)] # G. C. Greubel, Sep 11 2024

Formula

For n >= 5, a(n^2 + 24*n - 13) = 0.
For n >= 38, Max( a(k) : 1<=k<=n) = floor(sqrt(n+156)).

A088226 a(1)=0, a(2)=0, a(3)=1; for n>3, a(n) = abs(a(n-1) - a(n-2) - a(n-3)).

Original entry on oeis.org

0, 0, 1, 1, 0, 2, 1, 1, 2, 0, 3, 1, 2, 2, 1, 3, 0, 4, 1, 3, 2, 2, 3, 1, 4, 0, 5, 1, 4, 2, 3, 3, 2, 4, 1, 5, 0, 6, 1, 5, 2, 4, 3, 3, 4, 2, 5, 1, 6, 0, 7, 1, 6, 2, 5, 3, 4, 4, 3, 5, 2, 6, 1, 7, 0, 8, 1, 7, 2, 6, 3, 5, 4, 4, 5, 3, 6, 2, 7, 1, 8, 0, 9, 1, 8, 2, 7, 3, 6, 4, 5, 5, 4, 6, 3, 7, 2, 8, 1, 9, 0, 10, 1, 9, 2
Offset: 1

Views

Author

Benoit Cloitre, Nov 04 2003

Keywords

Comments

Conjecture: a(n) = m/2 where m is the smallest even distance from n to a square. - Ralf Stephan, Sep 23 2013

Crossrefs

Programs

  • Haskell
    a088226 n = a088226_list !! (n-1)
    a088226_list = 0 : 0 : 1 : zipWith3 (\u v w -> abs (w - v - u))
                   a088226_list (tail a088226_list) (drop 2 a088226_list)
    -- Reinhard Zumkeller, Oct 11 2014
    
  • Magma
    m:=120;
    A088226:=[n le 3 select Floor((n-1)/2) else Abs(Self(n-1) - Self(n-2) - Self(n-3)): n in [1..m+5]];
    [A088226[n]: n in [1..m]]; // G. C. Greubel, Sep 11 2024
    
  • Mathematica
    RecurrenceTable[{a[1]==a[2]==0,a[3]==1,a[n]==Abs[a[n-1]-a[n-2]-a[n-3]]},a,{n,110}] (* Harvey P. Dale, Apr 13 2012 *)
  • PARI
    a(n)=t=sqrtint(n);if((n-t*t)%2==0,(n-t*t)/2,((t+1)^2-n)/2) \\ Ralf Stephan, Sep 23 2013
    
  • SageMath
    @CachedFunction
    def a(n): # a = A088226
        if n<4: return int((n-1)//2)
        else: return abs(a(n-1)-a(n-2)-a(n-3))
    [a(n) for n in range(1,101)] # G. C. Greubel, Sep 11 2024

Formula

a(k^2 + 2*m + 2) = k-m and a(k^2 + 2*m + 1) = m, for k >= 0 and 0 <= m <= k.

A078108 Let u(1)=u(2)=1, u(3)=2n, u(k) = abs(u(k-1)-u(k-2)-u(k-3)) and M(k) = Max_{i<=i<=k} u(i), then for any k >= A078109(n), M(k) = floor(sqrt(k + a(n))).

Original entry on oeis.org

4, 24, 156, 184, 324, 608, 940, 1784, 1844, 3104, 5996, 4600, 4484, 6128, 6220, 7208, 8244, 9424, 11740, 13560, 14836, 19264, 19756, 23344, 24524, 26224, 32940, 34912, 34548, 42808, 52428, 46120, 47492, 52280, 67908, 86120, 80084, 147152
Offset: 1

Views

Author

Benoit Cloitre, Dec 05 2002

Keywords

Comments

It appears that (1) a(n) always exists, (2) a(n) is even, (3) a(n)/n^(5/2) -> infinity. If initial conditions are u(1)=u(2)=1, u(3)=2n+1, then u(k) reaches a 2-cycle for any k>m large enough (cf. A078098). - Benoit Cloitre, Jan 29 2006

Crossrefs

Extensions

Typos in data corrected by Sean A. Irvine, Jun 16 2025

A078109 Let u(1)=u(2)=1, u(3)=2n, u(k) = abs(u(k-1)-u(k-2)-u(k-3)) and M(k) = Max_{1<=i<=k} u(i), then for any k >= a(n), M(k) = floor(sqrt(k + A078108(n))).

Original entry on oeis.org

3, 10, 38, 10, 35, 66, 19, 150, 90, 30, 243, 159, 138, 270, 19, 186, 35, 178, 358, 127, 46, 334, 123, 370, 438, 343, 182, 430, 46, 454, 470, 534, 30, 618, 734, 903, 570, 302, 571, 638, 30, 166, 822, 647, 426, 998, 75, 106, 606, 322, 82, 210, 1798, 330, 506
Offset: 1

Views

Author

Benoit Cloitre, Dec 05 2002

Keywords

Comments

Conjecture : a(n) always exists, a(n)/n^2 is bounded. If initial conditions are u(1)=u(2)=1, u(3)=2n+1, then u(k) reaches a 2-cycle for any k>m large enough (cf. A078098)

Crossrefs

Extensions

Typos in data corrected and more terms from Sean A. Irvine, Jun 16 2025
Showing 1-8 of 8 results.