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.

Previous Showing 51-60 of 130 results. Next

A096449 Primes p such that the number of primes q, 5 <= q < p, congruent to 1 mod 3, is equal to the number of such primes congruent to 2 mod 3.

Original entry on oeis.org

5, 11, 17, 23, 41, 47, 83, 167, 227, 233, 608981812919, 608981812961, 608981813017, 608981813569, 608981813677, 608981813833, 608981813851, 608981813927, 608981813939, 608981813963, 608981814043, 608981814149, 608981814251, 608981814827
Offset: 1

Views

Author

Yasutoshi Kohmoto, Aug 12 2004

Keywords

Comments

First term prime(3) = 5 is placed on 0th row.
If prime(n-1) = +1 mod 3 is on k-th row then we put prime(n) on (k-1)-st row.
If prime(n-1) = -1 mod 3 is on k-th row then we put prime(n) on (k+1)-st row.
This process makes an array of prime numbers:
5, 11, 17, 23, 41, 47, 83, ... (this sequence)
7, 13, 19, 29, 37, 43, 53, 71, 79, 89, 101, .. (A096452).
31, 59, 67, 73, 97, ... (A096453)
61, ...

Crossrefs

Programs

  • Mathematica
    lst = {5}; p = 0; q = 0; r = 5; While[r < 10^9, If[ Mod[r, 3] == 2, p++, q++ ]; r = NextPrime@r; If[p == q, AppendTo[lst, r]; Print@r]]; lst (* Robert G. Wilson v, Sep 20 2009 *)

Formula

For n>1, a(n) = prime(A096629(n-1)+1) = A000040(A096629(n-1)+1). - Max Alekseyev, Sep 19 2009
a(n) = A151800(A098044(n)) = A007918(A098044(n)+1).

Extensions

More terms and better definition from Joshua Zucker, May 21 2006
Terms a(11) onward from Max Alekseyev, Feb 10 2011

A212721 Triangle read by rows: n-th row gives distinct products of partitions of n (A000041).

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 2, 3, 4, 5, 6, 1, 2, 3, 4, 5, 6, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 15, 16, 18, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, 18, 20, 24, 27, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14
Offset: 0

Views

Author

Reinhard Zumkeller, Jun 14 2012

Keywords

Comments

A034891(n) = length of n-th row;
A000792(n) = largest term of n-th row;
for n>5: A007918(n) = smallest number <= A000792(n) not occurring in n-th row.

Examples

			A000041(6)=11, the 11 partitions and their products of 6:
   1: (1,1,1,1,1,1)   ->   1 * 1 * 1 * 1 * 1 * 1 = 1
   2: (1,1,1,1,2)     ->   1 * 1 * 1 * 1 * 2     = 2
   3: (1,1,1,3)       ->   1 * 1 * 1 * 3         = 3
   4: (1,1,2,2)       ->   1 * 1 * 2 * 2         = 4
   5: (1,1,4)         ->   1 * 1 * 4             = 4
   6: (1,2,3)         ->   1 * 2 * 3             = 6
   7: (1,5)           ->   1 * 5                 = 5
   8: (2,2,2)         ->   2 * 2 * 2             = 8
   9: (2,4)           ->   2 * 4                 = 8
  10: (3,3)           ->   3 * 3                 = 9
  11: (6)             ->                           6,
sorted and duplicates removed: T(6,1..8)=[1,2,3,4,5,6,8,9], A034891(6)=8.
The triangle begins:
   0 |  [1]
   1 |  [1]
   2 |  [1,2]
   3 |  [1,2,3]
   4 |  [1,2,3,4]
   5 |  [1,2,3,4,5,6]
   6 |  [1,2,3,4,5,6,8,9]
   7 |  [1,2,3,4,5,6,7,8,9,10,12]
   8 |  [1,2,3,4,5,6,7,8,9,10,12,15,16,18]
   9 |  [1,2,3,4,5,6,7,8,9,10,12,14,15,16,18,20,24,27]
  10 |  [1,2,3,4,5,6,7,8,9,10,12,14,15,16,18,20,21,24,25,27,30,32,36].
		

Crossrefs

Programs

  • Haskell
    import Data.List (nub, sort)
    a212721 n k = a212721_row n !! (k-1)
    a212721_row = nub . sort . (map product) . ps 1 where
       ps x 0 = [[]]
       ps x y = [t:ts | t <- [x..y], ts <- ps t (y - t)]
    a212721_tabf = map a212721_row [0..]
    
  • Mathematica
    row[n_] := Union[Times @@@ IntegerPartitions[n]];
    Table[row[n], {n, 0, 10}] (* Jean-François Alcover, Jun 29 2019 *)
  • Sage
    [sorted(list(set([mul(p) for p in Partitions(n)]))) for n in range(11)] # Peter Luschny, Dec 13 2015

A362034 Triangle read by rows: T(n,0) = T(n,n) = 2, 0 < k < n: T(n,k) = smallest prime not less than T(n-1,k) + T(n-1,k-1).

Original entry on oeis.org

2, 2, 2, 2, 5, 2, 2, 7, 7, 2, 2, 11, 17, 11, 2, 2, 13, 29, 29, 13, 2, 2, 17, 43, 59, 43, 17, 2, 2, 19, 61, 103, 103, 61, 19, 2, 2, 23, 83, 167, 211, 167, 83, 23, 2, 2, 29, 107, 251, 379, 379, 251, 107, 29, 2, 2, 31, 137, 359, 631, 761, 631, 359, 137, 31, 2
Offset: 0

Views

Author

Jack Braxton, Apr 05 2023

Keywords

Comments

In order to get the next number in the row, you add the two numbers above it, and find the next prime.
3 is the only prime number that never shows up.
5 is the only prime number that only shows up once; every prime number above 5 shows up at least twice.

Examples

			Triangle begins:
      k=0  1   2   3   4   5   6   7   8  9 10
  n=0:  2
  n=1:  2  2
  n=2:  2  5   2
  n=3:  2  7   7   2
  n=4:  2 11  17  11   2
  n=5:  2 13  29  29  13   2
  n=6:  2 17  43  59  43  17   2
  n=7:  2 19  61 103 103  61  19   2
  n=8:  2 23  83 167 211 167  83  23   2
  n=9:  2 29 107 251 379 379 251 107  29  2
 n=10:  2 31 137 359 631 761 631 359 137 31  2
		

Crossrefs

Programs

  • Maple
    for n from 0 to 10 do
      T[n,0]:= 2: T[n,n]:= 2:
      for k from 1 to n-1 do
        T[n,k]:= nextprime(T[n-1,k-1]+T[n-1,k]-1)
      od
    od:
    for n from 0 to 10 do
      seq(T[n,k],k=0..n)
    od; # Robert Israel, Apr 05 2023
  • Mathematica
    T[n_, 0] := T[n, n] = 2; T[n_, k_] := T[n, k] = NextPrime[T[n - 1, k - 1] + T[n - 1, k] - 1]; Table[T[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Michael De Vlieger, Apr 06 2023, after Maple *)
  • PARI
    T(n,k) = if (n==0, 2, if (k==0, 2, if (k==n, 2, nextprime(T(n-1,k-1) + T(n-1,k))))); \\ Michel Marcus, Apr 07 2023

Formula

T(n,k) = A007918(T(n-1,k-1) + T(n-1,k)) for 0 < k < n. - Robert Israel, Apr 05 2023

A378457 Difference between n and the greatest prime power <= n, allowing 1.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 2, 0, 0, 1, 0, 1, 2, 3, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 2, 3, 4, 0, 1, 2, 3, 0, 1, 0, 1, 2, 3, 0, 1, 0, 1, 2, 3, 0, 1, 2, 3, 4, 5, 0, 1, 0, 1, 2, 0, 1, 2, 0, 1, 2, 3, 0, 1, 0, 1, 2, 3, 4, 5, 0, 1, 0, 1, 0, 1, 2, 3, 4
Offset: 1

Views

Author

Gus Wiseman, Nov 29 2024

Keywords

Comments

Prime powers allowing 1 are listed by A000961.

Examples

			The greatest prime power <= 6 is 5, so a(6) = 1.
		

Crossrefs

Sequences obtained by subtracting each term from n are placed in parentheses below.
For nonprime we have A010051 (almost) (A179278).
Subtracting from n gives (A031218).
For prime we have A064722 (A007917).
For perfect power we have A069584 (A081676).
For squarefree we have (A070321).
Adding one gives A276781.
For nonsquarefree we have (A378033).
For non perfect power we have (A378363).
For non prime power we have A378366 (A378367).
The opposite is A378370 = A377282-1.
A000015 gives the least prime power >= n.
A000040 lists the primes, differences A001223.
A000961 and A246655 list the prime powers, differences A057820.
A024619 and A361102 list the non prime powers, differences A375708 and A375735.
A151800 gives the least prime > n, weak version A007918.
Prime powers between primes: A053607, A080101, A304521, A366833, A377057.

Programs

  • Mathematica
    Table[n-NestWhile[#-1&,n,#>1&&!PrimePowerQ[#]&],{n,100}]

Formula

a(n) = n - A031218(n).
a(n) = A276781(n) - 1.

A070866 Smallest prime such that the difference of successive terms is nondecreasing.

Original entry on oeis.org

2, 3, 5, 7, 11, 17, 23, 29, 37, 47, 59, 71, 83, 97, 113, 131, 149, 167, 191, 223, 257, 293, 331, 373, 419, 467, 521, 577, 641, 709, 787, 877, 967, 1061, 1163, 1277, 1399, 1523, 1657, 1801, 1949, 2099, 2251, 2411, 2579, 2749, 2927, 3109, 3299, 3491, 3691, 3907
Offset: 1

Views

Author

Amarnath Murthy, May 16 2002

Keywords

Crossrefs

Cf. A070865.

Programs

  • Julia
    using Primes
    function A070866(bound)
        a, b = 2, 3
        P = [a, b]
        while true
            p = nextprime(b + (b - a))
            p > bound && break
            push!(P, p)
            a, b = b, p
        end
    P end
    A070866(100000) |> println # Peter Luschny, Dec 23 2019
  • Mathematica
    d = 2; p = 2; t = {2, 3}; Do[p = NextPrime[p + d - 1]; d = p - t[[-1]]; AppendTo[t, p], {98}]; t (* T. D. Noe, Nov 21 2011 *)
  • PARI
    s=1; t=1; for(n=1,100,s=s+t; while(isprime(s+t)==0,t++); print1(s+t,","))
    

Formula

a(1)=2, a(2)=3, a(n) = A007918(2*a(n-1) - a(n-2)). - Reinhard Zumkeller, Jul 08 2004

Extensions

More terms from Benoit Cloitre, May 20 2002

A091631 Next prime associated with A091628.

Original entry on oeis.org

29, 227, 2237, 22229, 222247, 2222239, 22222253, 222222227, 2222222243, 22222222273, 222222222301, 2222222222243, 22222222222229, 222222222222227, 2222222222222281, 22222222222222301, 222222222222222281
Offset: 1

Views

Author

Enoch Haga, Jan 24 2004

Keywords

Comments

Sequence arising in Farideh Firoozbakht's solution to Prime Puzzle 251 - 23 is the only pointer prime (A089823) not containing the digit "1".
The monotonically increasing value of successive product of digits (A091629) strongly suggests that in successive n the digit 1 must be present.

Examples

			a(1) = nextprime(23+1) = 29.
		

Crossrefs

Programs

  • PARI
    a(n) = nextprime((10^(n+1) - 1)/9*2 + 2); \\ Michel Marcus, Mar 18 2018

Formula

a(n) = A007918(A091628(n)+1).

Extensions

Edited and extended by Ray Chandler, Feb 07 2004

A113460 Triangle read by rows: n-th row is the lexicographically earliest arithmetic progression of n numbers all having the same prime signature.

Original entry on oeis.org

1, 2, 3, 3, 5, 7, 5, 11, 17, 23, 5, 11, 17, 23, 29, 7, 37, 67, 97, 127, 157, 7, 157, 307, 457, 607, 757, 907, 11, 1210241, 2420471, 3630701, 4840931, 6051161, 7261391, 8471621, 11, 32671181, 65342351, 98013521, 130684691, 163355861, 196027031, 228698201, 261369371
Offset: 1

Views

Author

David Wasserman, Jan 08 2006

Keywords

Comments

Presumably this triangle will differ from that in A130791 after some point. - N. J. A. Sloane, Sep 22 2007
Apart from the initial term, this sequence coincides with A130791 for at least the first 210 rows. - David W. Wilson, Sep 22 2007

Examples

			Triangle begins:
  1;
  2,   3;
  3,   5,   7;
  5,  11,  17,  23;
  5,  11,  17,  23,  29;
  7,  37,  67,  97, 127, 157;
  ...
From _M. F. Hasler_, Oct 10 2024: (Start)
For row 1, we can take 1, which is the only integer to have prime signature {}.
For row 2, we can't use 1 (no two integers with that prime signature), but primes 2 & 3 are a valid and then also minimal choice.
For row 3, primes {3, 5, 7} are a valid choice and also smallest: we can't use 1, nor 2, for reasons of parity: the next prime would be odd but the third term of the arithmetic progression would then again be even and not prime.
  The same reasoning also excludes any higher power 2^m as starting term, which would require the same (m-th) power of odd primes as subsequent terms.
For rows 4 and 5, we can't start with the prime 3, because the 4th term of any arithmetic progression starting with 3 is again divisible by 3. Also 4 = 2^2 is excluded, see above. Thus, 5 is the smallest possible starting term for n = 4 and 5.
For row 6 and 7, we again can't start with a prime < nextprime(6) = 7, because there can't be more than 5 primes in AP starting with 5: the sixth term would always be divisible by 5 again. To start with the even semiprime 6 = 2*3 would require an AP of even semiprimes. Dividing by 2, we would have an AP of 6 primes starting with 3, which is impossible.(*) So, 7 is the smallest possibility.
(* This actually excludes all even semiprimes 2*p between prime(k-1) and prime(k) from being a starting term of a row in that range, because that would yield an AP of >= prime(k-1) primes starting with p < prime(k)/2 < prime(k-1), impossible.)
Rows 8 through 11 can't start with a prime < nextprime(8) = 11, as before. We have also excluded any 2^m and 2*3 as starting value. Starting with 9 = 3^2 would require an AP of squares of primes, but all larger squares of primes have a difference (6k +- 1)^2 - (6m +- 1)^2 divisible by 12, which is not the case for the difference with 3^2 = 9. The even semiprime 10 = 2*5 was also excluded above (*). Therefore, 11 is the smallest possible initial term. And so on. (End)
		

Crossrefs

Cf. A113459 (leading terms).

Extensions

Erroneous commas in sequence deleted by N. J. A. Sloane, Sep 22 2007

A159477 a(n) = smallest prime >= n, if 1 is counted as a prime.

Original entry on oeis.org

1, 2, 3, 5, 5, 7, 7, 11, 11, 11, 11, 13, 13, 17, 17, 17, 17, 19, 19, 23, 23, 23, 23, 29, 29, 29, 29, 29, 29, 31, 31, 37, 37, 37, 37, 37, 37, 41, 41, 41, 41, 43, 43, 47, 47, 47, 47, 53, 53, 53, 53, 53, 53, 59, 59, 59, 59
Offset: 1

Views

Author

Jaroslav Krizek, Apr 13 2009

Keywords

Crossrefs

Cf. A008578.
Essentially the same as A066169 and A007918.

Programs

  • Haskell
    a159477 n = a159477_list !! (n-1)
    a159477_list = 1 : concat
       (zipWith (\p q -> replicate (fromInteger $ (q - p)) q)
                a008578_list $ tail a008578_list)
    -- Reinhard Zumkeller, Nov 09 2011
  • Mathematica
    Join[{1},NextPrime[Range[60]]] (* Harvey P. Dale, Jan 04 2012 *)

Formula

For n >= 2, a(n) = A007918(n). a(p) = p, a(c) = a(c+1), for p = primes (A000040), c = composite numbers (A002808).

A199582 Central terms of the triangle in A199333: a(n) = A199333(n,[n/2]).

Original entry on oeis.org

1, 1, 2, 3, 7, 13, 29, 53, 107, 211, 431, 809, 1619, 3037, 6079, 11467, 22937, 43541, 87083, 166183, 332393, 636761, 1273541, 2448049, 4896103, 9438851, 18877711, 36484271, 72968563, 141332173, 282664351, 548544487, 1097088989, 2132671027, 4265342057
Offset: 0

Views

Author

Reinhard Zumkeller, Nov 09 2011

Keywords

Comments

a(n) = max(A199333(n,k): 0<=k<=n/2) = A006530(A199695(n)) = A006530(A199696(n));
a(2*n) = A007918(a(2*n-1)) for n > 0.

Crossrefs

Programs

  • Haskell
    a199582 n = a199333_row n !! (n `div` 2)

A378369 Distance between n and the least nonsquarefree number >= n.

Original entry on oeis.org

3, 2, 1, 0, 3, 2, 1, 0, 0, 2, 1, 0, 3, 2, 1, 0, 1, 0, 1, 0, 3, 2, 1, 0, 0, 1, 0, 0, 3, 2, 1, 0, 3, 2, 1, 0, 3, 2, 1, 0, 3, 2, 1, 0, 0, 2, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 3, 2, 1, 0, 2, 1, 0, 0, 3, 2, 1, 0, 3, 2, 1, 0, 2, 1, 0, 0, 3, 2, 1, 0, 0, 2, 1, 0, 3, 2, 1
Offset: 1

Views

Author

Gus Wiseman, Dec 01 2024

Keywords

Comments

All terms are 0, 1, 2, or 3 (cf. A078147).

Crossrefs

Adding n to each term a(n) gives A120327.
Positions of 0 are A013929.
Positions of 1 are A373415.
Positions of 2 are A378458.
Positions of 3 are A007675.
Sequences obtained by adding n to each term are placed in parentheses below.
The version for primes is A007920 (A007918).
The version for perfect powers is A074984 (A377468).
The version for squarefree numbers is A081221 (A067535).
The version for non-perfect powers is A378357 (A378358).
The version for prime powers is A378370 (A000015).
The version for non prime powers is A378371 (A378372).
A005117 lists the squarefree numbers, first differences A076259.
A013929 lists the nonsquarefree numbers, first differences A078147.
A120992 gives run-lengths of squarefree numbers increasing by one.

Programs

  • Mathematica
    Table[NestWhile[#+1&,n,SquareFreeQ[#]&]-n,{n,100}]
Previous Showing 51-60 of 130 results. Next