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-10 of 595 results. Next

A075526 a(n) = A008578(n+2) - A008578(n+1).

Original entry on oeis.org

1, 1, 2, 2, 4, 2, 4, 2, 4, 6, 2, 6, 4, 2, 4, 6, 6, 2, 6, 4, 2, 6, 4, 6, 8, 4, 2, 4, 2, 4, 14, 4, 6, 2, 10, 2, 6, 6, 4, 6, 6, 2, 10, 2, 4, 2, 12, 12, 4, 2, 4, 6, 2, 10, 6, 6, 6, 2, 6, 4, 2, 10, 14, 4, 2, 4, 14, 6, 10, 2, 4, 6, 8, 6, 6, 4, 6, 8, 4, 8, 10, 2, 10, 2, 6, 4, 6, 8, 4, 2, 4, 12, 8, 4, 8, 4, 6
Offset: 0

Views

Author

Reinhard Zumkeller, Sep 22 2002

Keywords

Comments

n appears this number of times in A000720. - Lekraj Beedassy, Jun 19 2006
a(0) = 1, for n >= 1: a(n) = differences between consecutive primes (A001223(n)) = A158611(n+2) - A158611(n+1). Partial sums give A006093 (shifted). - Jaroslav Krizek, Aug 04 2009
First differences of noncomposite numbers. - Juri-Stepan Gerasimov, Feb 17 2010
This is 1 together with A001223. A054541 is 2 together with A001223. A125266 is 3 together with A001223. - Omar E. Pol, Nov 01 2013

Crossrefs

Programs

Formula

a(n) = A001223(n) for n>0.

Extensions

Correction for change of offset in A158611 and A008578 in Aug 2009 Jaroslav Krizek, Jan 27 2010

A014284 Partial sums of primes, if 1 is regarded as a prime (as it was until quite recently, see A008578).

Original entry on oeis.org

1, 3, 6, 11, 18, 29, 42, 59, 78, 101, 130, 161, 198, 239, 282, 329, 382, 441, 502, 569, 640, 713, 792, 875, 964, 1061, 1162, 1265, 1372, 1481, 1594, 1721, 1852, 1989, 2128, 2277, 2428, 2585, 2748, 2915, 3088, 3267, 3448, 3639, 3832, 4029
Offset: 1

Views

Author

Deepan Majmudar (dmajmuda(AT)esq.com)

Keywords

Comments

Lexicographically earliest sequence whose first differences are an increasing sequence of primes. Complement of A175969. - Jaroslav Krizek, Oct 31 2010
A175944(a(n)) = A018252(n). - Reinhard Zumkeller, Mar 18 2011
Partial sums of noncomposite numbers (A008578). - Omar E. Pol, Aug 09 2012

Examples

			a(7) = 42 because the first six primes (2, 3, 5, 7, 11, 13) add up to 41, and 1 + 41 = 42.
		

Crossrefs

Cf. A007504.
Equals A036439(n) - 1.
Cf. A008578.

Programs

Formula

a(n) = Sum_{k <= n} [(A158611(k + 1)) * (A000012(n - k + 1))] = Sum_{k <= n} [(A158611(k + 1)) * (A000012(k))] = Sum_{k <= n} [(A008578(k)) * (A000012(n - k + 1))] = Sum_{k <= n} [(A008578(k)) * (A000012(k))] for n, k >= 1. - Jaroslav Krizek, Aug 05 2009
a(n + 1) = A007504(n) + 1. a(n + 1) - a(n) = A000040(n) = n-th primes. - Jaroslav Krizek, Aug 19 2009
a(n) = a(n-1) + prime(n-1), with a(1)=1. - Vincenzo Librandi, Jul 27 2013
G.f: (x*(1+b(x)))/(1-x) = c(x)/(1-x), where b(x) and c(x) are respectively the g.f. of A000040 and A008578. - Mario C. Enriquez, Dec 10 2016

Extensions

Correction for Aug 2009 change of offset in A158611 and A008578 by Jaroslav Krizek, Jan 27 2010

A376682 Array read by antidiagonals downward where A(n,k) is the n-th term of the k-th differences of the noncomposite numbers (A008578).

Original entry on oeis.org

1, 2, 1, 3, 1, 0, 5, 2, 1, 1, 7, 2, 0, -1, -2, 11, 4, 2, 2, 3, 5, 13, 2, -2, -4, -6, -9, -14, 17, 4, 2, 4, 8, 14, 23, 37, 19, 2, -2, -4, -8, -16, -30, -53, -90, 23, 4, 2, 4, 8, 16, 32, 62, 115, 205, 29, 6, 2, 0, -4, -12, -28, -60, -122, -237, -442, 31, 2, -4, -6, -6, -2, 10, 38, 98, 220, 457, 899
Offset: 0

Views

Author

Gus Wiseman, Oct 15 2024

Keywords

Comments

Row k is the k-th differences of the noncomposite numbers.

Examples

			Array begins:
         n=1:  n=2:  n=3:  n=4:  n=5:  n=6:  n=7:  n=8:  n=9:
  -----------------------------------------------------------
  k=0:    1     2     3     5     7    11    13    17    19
  k=1:    1     1     2     2     4     2     4     2     4
  k=2:    0     1     0     2    -2     2    -2     2     2
  k=3:    1    -1     2    -4     4    -4     4     0    -6
  k=4:   -2     3    -6     8    -8     8    -4    -6    14
  k=5:    5    -9    14   -16    16   -12    -2    20   -28
  k=6:  -14    23   -30    32   -28    10    22   -48    48
  k=7:   37   -53    62   -60    38    12   -70    96   -70
  k=8:  -90   115  -122    98   -26   -82   166  -166    86
  k=9:  205  -237   220  -124   -56   248  -332   252   -86
Triangle begins:
    1
    2    1
    3    1    0
    5    2    1    1
    7    2    0   -1   -2
   11    4    2    2    3    5
   13    2   -2   -4   -6   -9  -14
   17    4    2    4    8   14   23   37
   19    2   -2   -4   -8  -16  -30  -53  -90
   23    4    2    4    8   16   32   62  115  205
   29    6    2    0   -4  -12  -28  -60 -122 -237 -442
   31    2   -4   -6   -6   -2   10   38   98  220  457  899
		

Crossrefs

The version for modern primes (A000040) is A095195.
Initial rows: A008578, A075526, A036263 with 0 prepended.
Column n = 1 is A030016 (modern A007442).
A version for partitions is A175804, cf. A053445, A281425, A320590.
Antidiagonal-sums are A376683 (modern A140119), absolute A376684 (modern A376681).
First position of 0 is A376855 (modern A376678).
For composite instead of prime we have A377033.
For squarefree instead of prime we have A377038, nonsquarefree A377046.
For prime-power instead of composite we have A377051.
A000040 lists the primes, differences A001223, second A036263.

Programs

  • Mathematica
    nn=12;
    t=Table[Take[Differences[NestList[NestWhile[#+1&, #+1,!PrimeQ[#]&]&,1,2*nn],k],nn],{k,0,nn}]
    (* or *)
    nn=12;
    q=Table[If[n==0,1,Prime[n]],{n,0,2nn}];
    Table[Sum[(-1)^(j-k)*Binomial[j,k]*q[[i+k]],{k,0,j}],{j,0,nn},{i,nn}]

Formula

A(i,j) = Sum_{k=0..j} (-1)^(j-k) binomial(j,k) A008578(i+k).

A376683 Antidiagonal-sums of the array A376682(n,k) = n-th term of the k-th differences of the noncomposite numbers (A008578).

Original entry on oeis.org

1, 3, 4, 9, 6, 27, -20, 109, -182, 471, -868, 1737, -2872, 4345, -4700, 1133, 14060, -55275, 150462, -346093, 717040, -1369351, 2432872, -4002905, 5964846, -7524917, 6123130, 4900199, -40900410, 134309057, -348584552, 798958881, -1678213106, 3277459119
Offset: 0

Views

Author

Gus Wiseman, Oct 15 2024

Keywords

Examples

			The fourth anti-diagonal of A376682 is: (7, 2, 0, -1, -2), so a(4) = 6.
		

Crossrefs

The modern version (for A000040 instead of A008578) is A140119.
The absolute version is A376681.
Antidiagonal-sums of A376682 (modern version A095195).
For composite instead of noncomposite we have A377033.
For squarefree instead of noncomposite we have A377038, nonsquarefree A377046.
A000040 lists the modern primes, differences A001223, second A036263.
A008578 lists the noncomposites, first differences A075526.

Programs

  • Mathematica
    nn=12;
    t=Table[Take[Differences[NestList[NestWhile[#+1&,#+1,!PrimeQ[#]&]&,1,2*nn],k],nn],{k,0,nn}];
    Total/@Table[t[[j,i-j+1]],{i,nn},{j,i}]

A376684 Antidiagonal-sums of the absolute value of the array A376682(n,k) = n-th term of the k-th differences of the noncomposite numbers (A008578).

Original entry on oeis.org

1, 3, 4, 9, 12, 27, 50, 109, 224, 471, 942, 1773, 3118, 4957, 7038, 9373, 16256, 55461, 150622, 346763, 718972, 1377101, 2462220, 4114987, 6387718, 9112455, 12051830, 17160117, 40946860, 134463917, 349105370, 800713921, 1684145408, 3297536923, 6040907554
Offset: 0

Views

Author

Gus Wiseman, Oct 15 2024

Keywords

Examples

			The fourth antidiagonal of A376682 is: (7, 2, 0, -1, -2), so a(4) = 12.
		

Crossrefs

For the modern primes (A000040) we have A376681, absolute version of A140119.
For firsts instead of row-sums we have A030016, modern A007442.
These are the antidiagonal-sums of the absolute value of A376682 (modern A095195).
This is the absolute version of A376683.
For first zero-positions we have A376855, modern A376678.
A000040 lists the modern primes, differences A001223, seconds A036263.
A008578 lists the noncomposites, first differences A075526.

Programs

  • Mathematica
    nn=12;
    t=Table[Take[Differences[NestList[NestWhile[#+1&,#+1,!PrimeQ[#]&]&,1,2*nn],k],nn],{k,0,nn}];
    Total/@Table[Abs[t[[j,i-j+1]]],{i,nn},{j,i}]

A376855 Position of first 0 in the n-th differences of the noncomposite numbers (A008578), or 0 if it does not appear.

Original entry on oeis.org

0, 0, 1, 8, 70, 14, 48, 59, 10, 44, 3554, 101, 7020, 14083, 68098, 14527, 149678, 2698, 481055, 979720, 631895, 29812, 25340979, 50574255, 7510844, 210829338, 67248862, 224076287, 910615648, 931510270, 452499645, 2880203723, 396680866, 57954439971, 77572822441, 35394938649
Offset: 0

Views

Author

Gus Wiseman, Oct 15 2024

Keywords

Examples

			The third differences of the noncomposite numbers begin: 1, -1, 2, -4, 4, -4, 4, 0, -6, 8, ... so a(3) = 8.
		

Crossrefs

For firsts instead of positions of zeros we have A030016, modern A007442.
These are the first zero-positions in A376682, modern A376678.
For row-sums instead of zero-positions we have A376683, modern A140119.
For absolute row-sums we have A376684, modern A376681.
For composite instead of noncomposite we have A377037.
For squarefree instead of noncomposite we have A377042, nonsquarefree A377050.
For prime-power instead of noncomposite we have A377055.
A000040 lists the modern primes, differences A001223, seconds A036263.
A008578 lists the noncomposite numbers, first differences A075526.

Programs

  • Mathematica
    nn=10000;
    u=Table[Differences[Select[Range[nn],#==1||PrimeQ[#]&],k],{k,2,16}];
    mnrm[s_]:=If[Min@@s==1,mnrm[DeleteCases[s-1,0]]+1,0];
    m=Table[Position[u[[k]],0][[1,1]],{k,mnrm[Union[First/@Position[u,0]]]}]

Extensions

a(16)-a(21) from Alois P. Heinz, Oct 18 2024
a(22)-a(35) from Lucas A. Brown, Nov 03 2024

A175965 Lexicographically earliest sequence with first differences as increasing sequence of noncomposites A008578.

Original entry on oeis.org

1, 2, 4, 7, 12, 19, 30, 43, 60, 79, 102, 131, 162, 199, 240, 283, 330, 383, 442, 503, 570, 641, 714, 793, 876, 965, 1062, 1163, 1266, 1373, 1482, 1595, 1722, 1853, 1990, 2129, 2278, 2429, 2586, 2749, 2916, 3089, 3268, 3449, 3640, 3833, 4030, 4229, 4440, 4663
Offset: 1

Views

Author

Jaroslav Krizek, Oct 31 2010

Keywords

Comments

Complement of A175966.
A175944(a(n)) = A018252(n). - Reinhard Zumkeller, Mar 18 2011

Crossrefs

Programs

  • Haskell
    a175965 n = a175965_list !! n
    a175965_list = scanl (+) 1 a008578_list
    -- Reinhard Zumkeller, Mar 26 2015
  • Mathematica
    FoldList[Plus,1,Join[{1},Prime[Range[50]]]] (* or *) Accumulate[ Join[ {1,1},Prime[Range[50]]]] (* Harvey P. Dale, Sep 28 2016 *)

Formula

a(n) = A036439(n-1) for n > 1.
a(n) - a(n-1) = A008578(n-1) for n > 1.
a(n) = A014284(n-1) + 1 for n > 1.

A175966 Complement of A175965(n), where A175965(n) = the lexicographically earliest sequence with first differences as increasing sequence of noncomposites A008578.

Original entry on oeis.org

3, 5, 6, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 80
Offset: 1

Views

Author

Jaroslav Krizek, Oct 31 2010

Keywords

Crossrefs

A289553 Numbers that are not the product of two distinct noncomposite numbers (A008578).

Original entry on oeis.org

1, 4, 8, 9, 12, 16, 18, 20, 24, 25, 27, 28, 30, 32, 36, 40, 42, 44, 45, 48, 49, 50, 52, 54, 56, 60, 63, 64, 66, 68, 70, 72, 75, 76, 78, 80, 81, 84, 88, 90, 92, 96, 98, 99, 100, 102, 104, 105, 108, 110, 112, 114, 116, 117, 120, 121, 124, 125, 126, 128, 130, 132
Offset: 1

Views

Author

Jaroslav Krizek, Jul 07 2017

Keywords

Comments

Numbers k such that tau(k) = A000005(k) is not equal to 2*omega(k) = 2*A001221(k).

Examples

			Number 6 is not in the sequence because 6 = 2 * 3.
		

Crossrefs

Complement of A167171.
Cf. A246716 (with two distinct primes), A008578 (with two distinct nonprimes), A289555 (with two distinct composites).

Programs

  • Magma
    [n: n in [1..1000] | NumberOfDivisors(n) ne 2*#PrimeDivisors(n)];

A377901 Let Q consist of 1 together with the primes (A008578); form the lexicographically earliest infinite sequence S of distinct positive numbers with the property that a(k) is in Q if and only if k is a term in S.

Original entry on oeis.org

1, 2, 3, 5, 7, 4, 11, 9, 13, 12, 17, 19, 23, 15, 29, 18, 31, 37, 41, 21, 43, 24, 47, 53, 26, 59, 28, 61, 67, 32, 71, 73, 34, 79, 36, 83, 89, 39, 97, 42, 101, 103, 107, 45, 109, 48, 113, 127, 50, 131, 52, 137, 139, 55, 149, 57, 151, 60, 157, 163, 167, 63, 173, 65
Offset: 1

Views

Author

N. J. A. Sloane, Nov 15 2024

Keywords

Comments

In the early 20th century, 1 was regarded as a prime (see A008578). The present sequence is therefore a 20th-century analog of A121053. That is, the sequence answers the question "Which terms are in Q?", and is the lexicographically earliest answer. See A121053 for further information.
Like A121053, this is an example of a "Lexicographically Earliest Sequence" for which there is a greedy algorithm: no backtracking is needed.
Theorem. Let p(k) = k-th prime, c(k) = k-th composite number. For n >= 7, if n is a prime or n = c(2*t) for some t, then a(n) = p(k) where k = floor((n+PrimePi(n)-1)/2); otherwise, n = c(2*t-1) for some t and a(n) = c(2*t).

Examples

			1 is the smallest possible choice for a(1), and 1 is in Q, and it turns out that there is no contradiction in choosing a(1) = 1.
After a(5) = 7, 4 is the smallest number not yet in the sequence, and a(4) = 5 is in Q, so we can try a(6) = 4 (and it turns out that this does not lead to a contradiction later).
		

References

  • N. J. A. Sloane, The Remarkable Sequences of Éric Angelini, MS in preparation, December 2024.

Crossrefs

Programs

  • Mathematica
    nn = 120; u = 4; v = {}; w = {}; c = 2;
    {1}~Join~Reap[Do[
      If[MemberQ[w, n], k = c;
        w = DeleteCases[w, n],
        m = Min[{c, u, v}];
        If[And[PrimeQ[m], n < m],
          AppendTo[v, n]];
          If[Length[v] > 0, If[v[[1]] == m, v = Rest[v]]]; k = m];
        AppendTo[w, k]; If[k == c, c++; While[CompositeQ[c], c++]]; Sow[k];
    If[n + 1 >= u, u++; While[PrimeQ[u], u++]], {n, 2, nn}] ][[-1, 1]] (* Michael De Vlieger, Dec 17 2024 *)

Extensions

More terms from Michael De Vlieger, Dec 17 2024
Showing 1-10 of 595 results. Next