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

A114537 Dispersion of the primes (an array read by downward antidiagonals).

Original entry on oeis.org

1, 2, 4, 3, 7, 6, 5, 17, 13, 8, 11, 59, 41, 19, 9, 31, 277, 179, 67, 23, 10, 127, 1787, 1063, 331, 83, 29, 12, 709, 15299, 8527, 2221, 431, 109, 37, 14, 5381, 167449, 87803, 19577, 3001, 599, 157, 43, 15, 52711, 2269733, 1128889, 219613, 27457, 4397, 919, 191, 47
Offset: 1

Views

Author

Clark Kimberling, Dec 07 2005

Keywords

Comments

A number is prime if and only if it does not lie in Column 1. As a sequence, a permutation of the natural numbers. The fractal sequence of this dispersion is A022447 and the transposition sequence is A114538.
The dispersion of the composite numbers is given at A114577.

Examples

			Northwest corner of the Primeness array:
1   2   3    5    11     31     127       709       5381       52711        648391
4   7  17   59   277   1787   15299    167449    2269733    37139213     718064159
6  13  41  179  1063   8527   87803   1128889   17624813   326851121    7069067389
8  19  67  331  2221  19577  219613   3042161   50728129   997525853   22742734291
9  23  83  431  3001  27457  318211   4535189   77557187  1559861749   36294260117
10  29 109  599  4397  42043  506683   7474967  131807699  2724711961   64988430769
12  37 157  919  7193  72727  919913  14161729  259336153  5545806481  136395369829
14  43 191 1153  9319  96797 1254739  19734581  368345293  8012791231  200147986693
15  47 211 1297 10631 112129 1471343  23391799  440817757  9672485827  243504973489
16  53 241 1523 12763 137077 1828669  29499439  563167303 12501968177  318083817907
18  61 283 1847 15823 173867 2364361  38790341  751783477 16917026909  435748987787
20  71 353 2381 21179 239489 3338989  56011909 1107276647 25366202179  664090238153
21  73 367 2477 22093 250751 3509299  59053067 1170710369 26887732891  705555301183
22  79 401 2749 24859 285191 4030889  68425619 1367161723 31621854169  835122557939
24  89 461 3259 30133 352007 5054303  87019979 1760768239 41192432219 1099216100167
25  97 509 3637 33967 401519 5823667 101146501 2062666783 48596930311 1305164025929
26 101 547 3943 37217 443419 6478961 113256643 2323114841 55022031709 1484830174901
27 103 563 4091 38833 464939 6816631 119535373 2458721501 58379844161 1579041544637
		

References

  • Alexandrov, Lubomir. "On the nonasymptotic prime number distribution." arXiv preprint math/9811096 (1998). (See Appendix.)
  • Clark Kimberling, "Fractal sequences and interspersions," Ars Combinatoria, 45 (1997) 157-168.

Crossrefs

Diagonal: A181441.
If the antidiagonals are read in the opposite direction we get A138947.

Programs

  • Maple
    A114537 := proc(r,c) option remember; if c = 1 then A018252(r) ; else ithprime(procname(r,c-1)) ; end if; end proc: # R. J. Mathar, Oct 22 2010
  • Mathematica
    NonPrime[n_] := FixedPoint[n + PrimePi@# + 1 &, n]; t[n_, k_] := Nest[Prime, NonPrime[n], k]; Table[ t[n - k, k], {n, 0, 9}, {k, n, 0, -1}] // Flatten
    (* or to view the table *) Table[t[n, k], {n, 0, 6}, {k, 0, 10}] // TableForm (* Robert G. Wilson v, Dec 26 2005 *)

Formula

T(r,1) = A018252(r). T(r,c) = prime(T(r,c-1)), c>1. [R. J. Mathar, Oct 22 2010]

A114538 Transposition sequence of the dispersion of the primes.

Original entry on oeis.org

1, 4, 6, 2, 8, 3, 7, 5, 11, 31, 9, 127, 17, 709, 5381, 52711, 13, 648391, 59, 9737333, 174440041, 3657500101, 277, 88362852307, 2428095424619, 75063692618249, 2586559730396077
Offset: 1

Views

Author

Clark Kimberling, Dec 07 2005

Keywords

Comments

A self-inverse permutation of the positive integers.

Examples

			Start with the northwest corner of T:
1 2 3 5 11 31 127 709 5381 52711 648391
4 7 17 59 277 1787 15299 167449 2269733 37139213 718064159
6 13 41 179 1063 8527 87803 1128889 17624813 326851121 7069067389
8 19 67 331 2221 19577 219613 3042161 50728129 997525853 22742734291
9 23 83 431 3001 27457 319211 4535189 77557187 1559861749 36294260117
10 29 109 599 4397 42043 506683 7474967 131807699 2824711961 64988430769
12 37 157 919 7193 72727 919913 14161729 259336153 5545806481 136395369829
a(1)=1 because 1=T(1,1) and T(1,1)=1.
a(2)=4 because 2=T(1,2) and T(2,1)=4.
a(3)=6 because 3=T(1,3) and T(3,1)=6.
a(13)=17 because 13=T(3,2) and T(2,3)=17.
		

Crossrefs

Cf. A114537.
Columns 1-6 above: A018252, A007821, A049078, A049079, A049080, A049081.

Formula

Suppose T is a rectangular array consisting of positive integers, each exactly once. The transposition sequence of T is here defined by placing T(i, j) in position T(j, i) for all i and j.

Extensions

a(22)-a(27) from Robert G. Wilson v, Dec 24 2005

A236542 Array T(n,k) read along descending antidiagonals: row n contains the primes with n steps in the prime index chain.

Original entry on oeis.org

2, 7, 3, 13, 17, 5, 19, 41, 59, 11, 23, 67, 179, 277, 31, 29, 83, 331, 1063, 1787, 127, 37, 109, 431, 2221, 8527, 15299, 709, 43, 157, 599, 3001, 19577, 87803, 167449, 5381, 47, 191, 919, 4397, 27457, 219613, 1128889, 2269733, 52711
Offset: 1

Views

Author

R. J. Mathar, Jan 28 2014

Keywords

Comments

Row n contains the primes A000040(j) for which A049076(j) = n.

Examples

			The array starts:
    2,    7,   13,   19,   23,   29,   37,   43,   47,   53,...
    3,   17,   41,   67,   83,  109,  157,  191,  211,  241,...
    5,   59,  179,  331,  431,  599,  919, 1153, 1297, 1523,...
   11,  277, 1063, 2221, 3001, 4397, 7193, 9319,10631,12763,...
   31, 1787, 8527,19577,27457,42043,72727,96797,112129,137077,...
		

Crossrefs

Cf. A007821 (row 1), A049078 (row 2), A049079 (row 3), A007097 (column 1), A058010 (diagonal), A057456 - A057457 (columns), A135044, A236536.

Programs

  • Maple
    A236542 := proc(n,k)
        option remember ;
        if n = 1 then
            A007821(k) ;
        else
            ithprime(procname(n-1,k)) ;
        end if:
    end proc:
    for d from 2 to 10 do
        for k from d-1 to 1 by -1 do
                printf("%d,",A236542(d-k,k)) ;
        end do:
    end do:
  • Mathematica
    A007821 = Prime[Select[Range[15], !PrimeQ[#]&]];
    T[n_, k_] := T[n, k] = If[n == 1, If[k <= Length[A007821], A007821[[k]], Print["A007821 must be extended"]; Abort[]], Prime[T[n-1, k]]];
    Table[T[n-k+1, k], {n, 1, 9}, {k, n, 1, -1}] // Flatten (* Jean-François Alcover, Apr 16 2020 *)

Formula

T(1,k) = A007821(k).
T(n,k) = prime( T(n-1,k) ), n>1 .

A138947 Square array T[i+1,j] = prime(T[i,j]), T[1,j] = j-th nonprime = A018252(j); read by upward antidiagonals.

Original entry on oeis.org

1, 4, 2, 6, 7, 3, 8, 13, 17, 5, 9, 19, 41, 59, 11, 10, 23, 67, 179, 277, 31, 12, 29, 83, 331, 1063, 1787, 127, 14, 37, 109, 431, 2221, 8527, 15299, 709, 15, 43, 157, 599, 3001, 19577, 87803
Offset: 1

Views

Author

M. F. Hasler, Apr 28 2008

Keywords

Comments

For i>1, T[i,j] = A018252(j)-th number among those not occurring in rows < i.
A permutation of the integers > 0.
Transpose of A114537. See that sequence and the link for more information and references.

Examples

			The first row (1,4,6,8,9,10...) of the array gives the nonprime numbers A018252.
The 2nd row (2,7,13,19,23,29,37,...) of the array gives the primes with nonprime index, A000040(A018252(j)) = A007821(j).
The i-th row is { A000040(k) | A049076(k)=i-1 } = A078442^{-1}(i-1).
Column j is the sequence b(n+1)=prime(b(n)) starting with b(j)=A018252(j): A007097, A057450, A057451, A057452, A057453, A057456, A057457, ...
		

References

  • Alexandrov, Lubomir. "On the nonasymptotic prime number distribution." arXiv preprint math/9811096 (1998). (See Appendix.)

Crossrefs

If the antidiagonals are read in the opposite direction we get A114537.

Programs

  • Mathematica
    t[1, 1] = 1; t[1, 2] = 4; t[1, k_] := (p = t[1, k-1]; If[ PrimeQ[p+1], p+2, p+1]); t[n_ /; n > 1, k_] := Prime[t[n-1, k]]; Flatten[ Table[ t[n, k-n+1], {k, 1, 9}, {n, 1, k}]] (* Jean-François Alcover, Oct 03 2011 *)
  • PARI
    p=c=0; T=matrix( 10,10, i,j, if( i==1, while( isprime(c++),); p=c, p=prime(p))); A138947=concat( vector( vecmin( matsize( T )),i, vector( i,j, T[ j,i+1-j ])))

Formula

T[i,j] = j-th number for which A078442 equals i-1.

A064960 The prime then composite recurrence; a(2n) = a(2n-1)-th prime and a(2n+1) = a(2n)-th composite and a(1) = 1.

Original entry on oeis.org

1, 2, 6, 13, 22, 79, 108, 593, 722, 5471, 6290, 62653, 69558, 876329, 951338, 14679751, 15692307, 289078661, 305618710, 6588286337, 6908033000, 171482959009, 178668550322, 5040266614919, 5225256019175, 165678678591359, 171068472492228, 6039923990345039
Offset: 1

Views

Author

Robert G. Wilson v, Oct 29 2001

Keywords

Crossrefs

Programs

  • Mathematica
    Composite[n_Integer] := FixedPoint[n + PrimePi[ # ] + 1 &, n + PrimePi[n] + 1]; a = {1}; b = 1; Do[ If[ !PrimeQ[b], b = Prime[b], b = Composite[b]]; a = Append[a, b], {n, 1, 23}]; a
  • Python
    from functools import cache
    from sympy import prime, composite
    @cache
    def A064960(n): return 1 if n == 1 else composite(A064960(n-1)) if n % 2 else prime(A064960(n-1)) # Chai Wah Wu, Jan 01 2022

Extensions

a(26)-a(28) from Chai Wah Wu, May 07 2018

A064961 Composite-then-prime recurrence; a(2n) = a(2n-1)-th composite and a(2n+1) = a(2n)-th prime and a(1) = 1.

Original entry on oeis.org

1, 4, 7, 14, 43, 62, 293, 366, 2473, 2892, 26317, 29522, 344249, 376259, 5429539, 5831545, 101291779, 107457490, 2198218819, 2310909505, 54720307351, 57128530327, 1543908890351, 1603146693999, 48871886538151, 50527531769529, 1720466016680911, 1772475453490311
Offset: 1

Views

Author

Robert G. Wilson v, Oct 29 2001

Keywords

Crossrefs

Programs

  • Mathematica
    Composite[n_Integer] := FixedPoint[n + PrimePi[ # ] + 1 &, n + PrimePi[n] + 1]; a = {1, 4}; b = 4; Do[ If[ !PrimeQ[b], b = Prime[b], b = Composite[b]]; a = Append[a, b], {n, 1, 23}]; a

Extensions

a(24)-a(26) corrected and a(27)-a(28) added by Chai Wah Wu, Aug 22 2018

A058010 The main diagonal of N. Fernandez's Order of Primeness array.

Original entry on oeis.org

2, 17, 179, 2221, 27457, 506683, 14161729, 368345293, 9672485827, 318083817907, 12695664159413
Offset: 1

Views

Author

Robert G. Wilson v, Nov 13 2000

Keywords

Crossrefs

Main diagonal of A236542.

Programs

  • Mathematica
    a = Select[ Range[ 20 ], ! PrimeQ[ # ] & ] Table[ Nest[ Prime, a[ [ n ] ], n ], {n, 1, 11} ]
Showing 1-7 of 7 results.