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 27 results. Next

A027833 Distances between successive 2's in sequence A001223 of differences between consecutive primes.

Original entry on oeis.org

1, 2, 2, 3, 3, 4, 3, 6, 2, 5, 2, 6, 2, 2, 4, 3, 5, 3, 4, 5, 12, 2, 6, 9, 6, 5, 4, 3, 4, 20, 2, 2, 4, 4, 19, 2, 3, 2, 4, 8, 11, 5, 3, 3, 3, 10, 5, 4, 2, 17, 3, 6, 3, 3, 9, 9, 2, 6, 2, 6, 5, 6, 2, 3, 2, 3, 9, 4, 7, 3, 7, 20, 4, 7, 6, 5, 3, 7, 3, 20, 2, 14, 4, 10, 2, 3, 6, 4, 2, 2, 7, 2, 6, 3
Offset: 1

Views

Author

Jean-Marc MALASOMA (Malasoma(AT)entpe.fr)

Keywords

Comments

a(n) = number of primes p such that A014574(n) < p < A014574(n+1). - Thomas Ordowski, Jul 20 2012
Conjecture: a(n) < log(A014574(n))^2. - Thomas Ordowski, Jul 21 2012
Conjecture: All positive integers are represented in this sequence. This is verified up to 184, by searching up to prime indexes of ~128000000. The rate of filling-in the smallest remaining gap among the integers, and the growth in the maximum value found, both slow down considerably relative to a fixed quantity of twin prime incidences examined in each pass. The maximum value found was 237. - Richard R. Forberg, Jul 28 2016
All positive integers below 312 are in this sequence. - Charles R Greathouse IV, Aug 01 2016
From Gus Wiseman, Jun 11 2024: (Start)
Also the length of the n-th maximal antirun of prime numbers > 3, where an antirun is an interval of positions at which consecutive terms differ by more than 2. These begin:
5
7 11
13 17
19 23 29
31 37 41
43 47 53 59
61 67 71
73 79 83 89 97 101
(End)

Crossrefs

First differences of A029707 and A155752 = A029707 - 1. M. F. Hasler, Jul 24 2012
Positions of first appearances are A373401, sorted A373402.
Functional neighbors: A001359, A006512, A251092 or A175632, A373127 (firsts A373128, sorted A373200), A373403, A373405, A373409.
A000040 lists the primes, differences A001223.
A002808 lists the composite numbers, differences A073783.
A046933 counts composite numbers between primes.
A065855 counts composite numbers up to n.

Programs

  • Maple
    A027833 := proc(n)
        local plow,phigh ;
        phigh := A001359(n+1) ;
        plow := A001359(n) ;
        numtheory[pi](phigh)-numtheory[pi](plow) ;
    end proc:
    seq(A027833(n),n=1..100) ; # R. J. Mathar, Jan 20 2025
  • Mathematica
    Differences[Flatten[Position[Differences[Prime[Range[500]]],2]]] (* Harvey P. Dale, Nov 17 2018 *)
    Length/@Split[Select[Range[4,10000],PrimeQ[#]&],#1+2!=#2&]//Most (* Gus Wiseman, Jun 11 2024 *)
  • PARI
    n=1; p=5; forprime(q=7,1e3, if(q-p==2, print1(n", "); n=1, n++); p=q) \\ Charles R Greathouse IV, Aug 01 2016
  • Sage
    def A027833(n) :
       a = [ ]
       st = 2
       for i in (3..n) :
          if (nth_prime(i+1)-nth_prime(i) == 2) :
             a.append(i-st)
             st = i
       return(a)
    A027833(496) # Jani Melik, May 15 2014
    

A351005 Number of integer partitions of n into parts that are alternately equal and unequal.

Original entry on oeis.org

1, 1, 2, 1, 2, 2, 3, 2, 4, 2, 5, 4, 6, 4, 8, 5, 10, 6, 12, 8, 16, 9, 18, 12, 22, 14, 28, 16, 33, 20, 40, 24, 48, 28, 56, 34, 67, 40, 80, 46, 94, 56, 110, 64, 130, 75, 152, 88, 176, 102, 206, 118, 238, 138, 276, 159, 320, 182, 368, 210, 424, 242, 488, 276, 558
Offset: 0

Views

Author

Gus Wiseman, Jan 31 2022

Keywords

Comments

Also partitions whose multiplicities are all 2's, except possibly for the last, which may be 1.

Examples

			The a(1) = 1 through a(12) = 6 partitions (A..C = 10..12):
  1  2   3  4   5    6     7    8     9    A     B      C
     11     22  221  33    331  44    441  55    443    66
                     2211       332        442   551    552
                                3311       3322  33221  4422
                                           4411         5511
                                                        332211
		

Crossrefs

The even-length ordered version is A003242, ranked by A351010.
The even-length case is A035457.
Without equalities we have A122135, opposite A122129, even-length A122134.
The non-strict version is A351004, opposite A351003, even-length A035363.
The opposite version is A351006, even-length A351007.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],And@@Table[#[[i]]==#[[i+1]],{i,1,Length[#]-1,2}]&&And@@Table[#[[i]]!=#[[i+1]],{i,2,Length[#]-1,2}]&]],{n,0,30}]

A351006 Number of integer partitions of n into parts that are alternately unequal and equal.

Original entry on oeis.org

1, 1, 1, 2, 3, 4, 4, 6, 7, 9, 10, 12, 14, 16, 18, 22, 25, 28, 31, 36, 40, 46, 50, 56, 64, 71, 78, 88, 96, 106, 118, 130, 143, 158, 172, 190, 209, 228, 248, 274, 298, 324, 354, 384, 418, 458, 494, 536, 584, 631, 683, 742, 800, 864, 936, 1010, 1088, 1176, 1264
Offset: 0

Views

Author

Gus Wiseman, Jan 31 2022

Keywords

Examples

			The a(1) = 1 through a(11) = 12 partitions (A = 10, B = 11):
  1  2  3   4    5    6    7    8     9      A      B
        21  31   32   42   43   53    54     64     65
            211  41   51   52   62    63     73     74
                 311  411  61   71    72     82     83
                           322  422   81     91     92
                           511  611   522    433    A1
                                3221  711    622    533
                                      4221   811    722
                                      32211  5221   911
                                             42211  4331
                                                    6221
                                                    52211
		

Crossrefs

Without equalities we have A122129, opposite A122135, even-length A351008.
The non-strict version is A351003, opposite A351004, even-length A351012.
The alternately equal and unequal version is A351005, even-length A035457.
The even-length case is A351007.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],And@@Table[#[[i]]==#[[i+1]],{i,2,Length[#]-1,2}]&&And@@Table[#[[i]]!=#[[i+1]],{i,1,Length[#]-1,2}]&]],{n,0,30}]

A373127 Length of the n-th maximal antirun of squarefree numbers differing by more than one.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Jun 05 2024

Keywords

Comments

The sum of this antirun is given by A373411.
An antirun of a sequence (in this case A005117) is an interval of positions at which consecutive terms differ by more than one.

Examples

			Row-lengths of:
   1
   2
   3  5
   6
   7 10
  11 13
  14
  15 17 19 21
  22
  23 26 29
  30
  31 33
  34
  35 37
  38
  39 41
  42
  43 46
  47 51 53 55 57
		

Crossrefs

Positions of first appearances are A373128, sorted A373200.
Functional neighbors: A007674, A027833 (partial sums A029707), A120992, A373403, A373408, A373409, A373411.
A005117 lists the squarefree numbers, first differences A076259.
A013929 lists the nonsquarefree numbers, first differences A078147.
A077643 counts squarefree numbers with n bits, sum A373123.

Programs

  • Mathematica
    Length/@Split[Select[Range[100],SquareFreeQ],#1+1!=#2&]

A122134 Expansion of Sum_{k>=0} x^(k^2+k)/((1-x)(1-x^2)...(1-x^(2k))).

Original entry on oeis.org

1, 0, 1, 1, 2, 2, 4, 4, 6, 7, 10, 11, 16, 18, 24, 28, 36, 42, 54, 62, 78, 91, 112, 130, 159, 184, 222, 258, 308, 356, 424, 488, 576, 664, 778, 894, 1044, 1196, 1389, 1590, 1838, 2098, 2419, 2754, 3162, 3596, 4114, 4668, 5328, 6032, 6864, 7760, 8806, 9936, 11252
Offset: 0

Views

Author

Michael Somos, Aug 21 2006, Oct 10 2007

Keywords

Comments

Generating function arises naturally in Rodney Baxter's solution of the Hard Hexagon Model according to George Andrews.
In Watson 1937 page 275 he writes "Psi_0(q^{1/2},q) = prod_1^oo (1+q^{2n}) G(-q^2)" so this is the expansion in powers of q^2. - Michael Somos, Jun 29 2015
Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).
Rogers-Ramanujan functions: G(q) (see A003114), H(q) (A003106).
From Gus Wiseman, Feb 26 2022: (Start)
Conjecture: Also the number of even-length integer partitions y of n such that y_i != y_{i+1} for all even i. For example, the a(2) = 1 through a(9) = 7 partitions are:
(11) (21) (22) (32) (33) (43) (44) (54)
(31) (41) (42) (52) (53) (63)
(51) (61) (62) (72)
(2211) (3211) (71) (81)
(3311) (3321)
(4211) (4311)
(5211)
This appears to be the even-length version of A122135.
The odd-length version is A351595.
For Wiseman's conjecture above and three other partition-theoretic interpretations of this sequence see Connor, Proposition 3. - Peter Bala, Jan 02 2025

Examples

			G.f. = 1 + x^2 + x^3 + 2*x^4 + 2*x^5 + 4*x^6 + 4*x^7 + 6*x^8 + 7*x^9 + ...
G.f. = q + q^81 + q^121 + 2*q^161 + 2*q^201 + 4*q^241 + 4*q^281 + ...
		

References

  • G. E. Andrews, R. Askey and R. Roy, Special Functions, Cambridge University Press, 1999; Exercise 6(c), p. 591.
  • G. E. Andrews, q-series, CBMS Regional Conference Series in Mathematics, 66, Amer. Math. Soc. 1986, see p. 8, Eq. (1.6). MR0858826 (88b:11063)

Crossrefs

Programs

  • Mathematica
    a[ n_] := If[ n < 0, 0, SeriesCoefficient[ Sum[ x^(k^2 + k) / QPochhammer[ x, x, 2 k], {k, 0, (Sqrt[ 4 n + 1] - 1) / 2}], {x, 0, n}]]; (* Michael Somos, Jun 29 2015 *)
    a[ n_] := SeriesCoefficient [ 1 / (QPochhammer[ x^4, -x^5] QPochhammer[ -x, -x^5] QPochhammer[ x, x^2]), {x, 0, n}]; (* Michael Somos, Jun 29 2015 *)
    a[ n_] := SeriesCoefficient[ QPochhammer[ x^2, -x^5] QPochhammer[ -x^3, -x^5] QPochhammer[ -x^5] / EllipticTheta[ 4, 0, x^2], {x, 0, n}]; (* Michael Somos, Jun 29 2015 *)
    nmax = 50; CoefficientList[Series[Product[1/((1 - x^(20*k+2))*(1 - x^(20*k+3))*(1 - x^(20*k+4))*(1 - x^(20*k+5))*(1 - x^(20*k+6))*(1 - x^(20*k+7))*(1 - x^(20*k+13))*(1 - x^(20*k+14))*(1 - x^(20*k+15))*(1 - x^(20*k+16))*(1 - x^(20*k+17)) *(1 - x^(20*k+18))), {k, 0, nmax}], {x, 0, nmax}], x] (* Vaclav Kotesovec, Nov 12 2016 *)
  • PARI
    {a(n) = if( n<0, 0, polcoeff( sum(k=0, (sqrtint(4*n + 1) - 1)\2, x^(k^2 + k) / prod(i=1, 2*k, 1 - x^i, 1 + x * O(x^(n -k^2-k)))), n))};

Formula

Euler transform of period 20 sequence [ 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, ...].
Expansion of f(x^4, x^6) / f(-x^2, -x^3) in powers of x where f(, ) is the Ramanujan general theta function. - Michael Somos, Jun 29 2015
Expansion of f(-x^2, x^3) / phi(-x^2) in powers of x where phi() is a Ramanujan theta function. - Michael Somos, Jun 29 2015
Expansion of G(-x) / chi(-x) in powers of x where chi() is a Ramanujan theta function and G() is a Rogers-Ramanujan function. - Michael Somos, Jun 29 2015
G.f.: Sum_{k>=0} x^(k^2 + k) / ((1 - x) * (1 - x^2) * ... * (1 - x^(2*k))).
Expansion of f(-x, -x^9) * f(-x^8, -x^12) / ( f(-x) * f(-x^20) ) in powers of x where f(, ) is the Ramanujan general theta function.
a(n) = number of partitions of n into parts that are each either == 2, 3, ..., 7 (mod 20) or == 13, 14, ..., 18 (mod 20). - Michael Somos, Jun 29 2015 [corrected by Vaclav Kotesovec, Nov 12 2016]
a(n) ~ (3 - sqrt(5))^(1/4) * exp(Pi*sqrt(2*n/5)) / (4*sqrt(5)*n^(3/4)). - Vaclav Kotesovec, Nov 12 2016

A373409 Length of the n-th maximal antirun of nonsquarefree numbers differing by more than one.

Original entry on oeis.org

2, 6, 2, 5, 2, 1, 6, 4, 2, 7, 1, 5, 2, 2, 1, 4, 4, 3, 6, 2, 2, 4, 7, 5, 7, 1, 1, 6, 6, 2, 3, 4, 7, 3, 3, 5, 1, 3, 1, 3, 2, 2, 3, 5, 5, 7, 1, 5, 7, 5, 1, 8, 4, 2, 5, 2, 2, 3, 3, 1, 7, 3, 4, 7, 1, 5, 2, 5, 2, 6, 7, 6, 7, 5, 1, 2, 3, 5, 6, 4, 1, 3, 5, 7, 2, 3, 2
Offset: 1

Views

Author

Gus Wiseman, Jun 06 2024

Keywords

Comments

An antirun of a sequence (in this case A013929) is an interval of positions at which consecutive terms differ by more than one.
Conjecture: The maximum is 9, and there is no antirun of more than 9 nonsquarefree numbers. Confirmed up to 100,000,000.

Examples

			Row-lengths of:
   4   8
   9  12  16  18  20  24
  25  27
  28  32  36  40  44
  45  48
  49
  50  52  54  56  60  63
  64  68  72  75
  76  80
  81  84  88  90  92  96  98
  99
The first maximal antirun of length 9 is the following, shown with prime indices:
  6345: {2,2,2,3,15}
  6348: {1,1,2,9,9}
  6350: {1,3,3,31}
  6352: {1,1,1,1,78}
  6354: {1,2,2,71}
  6356: {1,1,4,49}
  6358: {1,5,7,7}
  6360: {1,1,1,2,3,16}
  6363: {2,2,4,26}
		

Crossrefs

Positions of first appearances are A373573, sorted A373574.
Functional neighbors: A027833, A053797, A068781, A373127, A373403, A373410, A373412.
A005117 lists the squarefree numbers, first differences A076259.
A013929 lists the nonsquarefree numbers, first differences A078147.

Programs

  • Mathematica
    Length/@Split[Select[Range[1000],!SquareFreeQ[#]&],#1+1!=#2&]//Most

A351007 Number of even-length integer partitions of n into parts that are alternately unequal and equal.

Original entry on oeis.org

1, 0, 0, 1, 1, 2, 2, 3, 4, 5, 5, 7, 8, 9, 10, 13, 14, 16, 18, 20, 23, 27, 28, 32, 37, 40, 44, 51, 54, 60, 67, 73, 81, 90, 96, 107, 118, 127, 139, 154, 166, 181, 198, 213, 232, 256, 273, 297, 325, 348, 377, 411, 440, 476, 516, 555, 598, 647, 692, 746, 807
Offset: 0

Views

Author

Gus Wiseman, Jan 31 2022

Keywords

Comments

These are partitions whose multiplicities begin with a 1, are followed by any number of 2's, and end with another 1.

Examples

			The a(3) = 1 through a(15) = 13 partitions (A..E = 10..14):
  21  31  32  42  43  53    54    64    65    75    76    86    87
          41  51  52  62    63    73    74    84    85    95    96
                  61  71    72    82    83    93    94    A4    A5
                      3221  81    91    92    A2    A3    B3    B4
                            4221  5221  A1    B1    B2    C2    C3
                                        4331  4332  C1    D1    D2
                                        6221  5331  5332  5441  E1
                                              7221  6331  6332  5442
                                                    8221  7331  6441
                                                          9221  7332
                                                                8331
                                                                A221
                                                                433221
		

Crossrefs

The alternately equal and unequal version is A035457, any length A351005.
This is the even-length case of A351006, odd-length A053251.
Without equalities we have A351008, any length A122129, opposite A122135.
Without inequalities we have A351012, any length A351003, opposite A351004.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],EvenQ[Length[#]]&&And@@Table[#[[i]]==#[[i+1]],{i,2,Length[#]-1,2}]&&And@@Table[#[[i]]!=#[[i+1]],{i,1,Length[#]-1,2}]&]],{n,0,30}]

A350839 Number of integer partitions of n with a difference < -1 and a conjugate difference < -1.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 2, 3, 7, 11, 17, 26, 39, 54, 81, 108, 148, 201, 269, 353, 467, 601, 779, 995, 1272, 1605, 2029, 2538, 3171, 3941, 4881, 6012, 7405, 9058, 11077, 13478, 16373, 19817, 23953, 28850, 34692, 41599, 49802, 59461, 70905, 84321, 100155, 118694
Offset: 0

Views

Author

Gus Wiseman, Jan 24 2022

Keywords

Comments

We define a difference of a partition to be a difference of two adjacent parts.

Examples

			The a(5) = 1 through a(10) = 17 partitions:
  (311)  (411)   (511)    (422)     (522)      (622)
         (3111)  (4111)   (611)     (711)      (811)
                 (31111)  (3311)    (4221)     (4222)
                          (4211)    (4311)     (4411)
                          (5111)    (5211)     (5221)
                          (41111)   (6111)     (5311)
                          (311111)  (33111)    (6211)
                                    (42111)    (7111)
                                    (51111)    (42211)
                                    (411111)   (43111)
                                    (3111111)  (52111)
                                               (61111)
                                               (331111)
                                               (421111)
                                               (511111)
                                               (4111111)
                                               (31111111)
		

Crossrefs

Allowing -1 gives A144300 = non-constant partitions.
Taking one of the two conditions gives A239955, ranked by A073492, A065201.
These partitions are ranked by A350841.
A000041 = integer partitions, strict A000009.
A034296 = flat (contiguous) partitions, strict A001227.
A073491 = numbers whose prime indices have no gaps, strict A137793.
A090858 = partitions with a single hole, ranked by A325284.
A116931 = partitions with differences != -1, strict A003114.
A116932 = partitions with differences != -1 or -2, strict A025157.
A277103 = partitions with the same number of odd parts as their conjugate.
A350837 = partitions with no adjacent doublings, strict A350840.
A350842 = partitions with differences != -2, strict A350844, sets A005314.

Programs

  • Mathematica
    conj[y_]:=If[Length[y]==0,y,Table[Length[Select[y,#>=k&]],{k,1,Max[y]}]];
    Table[Length[Select[IntegerPartitions[n],(Min@@Differences[#]<-1)&&(Min@@Differences[conj[#]]<-1)&]],{n,0,30}]

A350844 Number of strict integer partitions of n with no difference -2.

Original entry on oeis.org

1, 1, 1, 2, 1, 3, 3, 4, 4, 7, 7, 8, 11, 12, 15, 18, 21, 23, 31, 32, 40, 45, 54, 59, 73, 78, 94, 106, 122, 136, 161, 177, 203, 231, 259, 293, 334, 372, 417, 476, 525, 592, 663, 742, 821, 931, 1020, 1147, 1271, 1416, 1558, 1752, 1916, 2137, 2357, 2613, 2867
Offset: 0

Views

Author

Gus Wiseman, Jan 21 2022

Keywords

Examples

			The a(1) = 1 through a(12) = 11 partitions (A..C = 10..12):
  1   2   3    4   5    6     7    8     9     A      B     C
          21       32   51    43   62    54    73     65    84
                   41   321   52   71    63    82     74    93
                              61   521   72    91     83    A2
                                         81    541    92    B1
                                         432   721    A1    543
                                         621   4321   632   651
                                                      821   732
                                                            741
                                                            921
                                                            6321
		

Crossrefs

The version for no difference 0 is A000009.
The version for no difference > -2 is A001227, non-strict A034296.
The version for no difference -1 is A003114 (A325160).
The version for subsets of prescribed maximum is A005314.
The version for all differences < -2 is A025157, non-strict A116932.
The opposite version is A072670.
The multiplicative version is A350840, non-strict A350837 (A350838).
The non-strict version is A350842.
A000041 counts integer partitions.
A027187 counts partitions of even length.
A027193 counts partitions of odd length (A026424).
A116931 counts partitions with no difference -1 (A319630).
A323092 counts double-free integer partitions (A320340) strict A120641.
A325534 counts separable partitions (A335433).
A325535 counts inseparable partitions (A335448).

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],FreeQ[Differences[#],0|-2]&]],{n,0,30}]

A373404 Sum of the n-th maximal antirun of composite numbers differing by more than one.

Original entry on oeis.org

18, 9, 36, 15, 54, 21, 46, 25, 26, 27, 90, 33, 34, 35, 74, 39, 126, 45, 94, 49, 50, 51, 106, 55, 56, 57, 180, 63, 64, 65, 134, 69, 216, 75, 76, 77, 158, 81, 166, 85, 86, 87, 178, 91, 92, 93, 94, 95, 194, 99, 306, 105, 324, 111, 226, 115, 116, 117, 118, 119
Offset: 1

Views

Author

Gus Wiseman, Jun 05 2024

Keywords

Comments

The length of this antirun is given by A373403.
An antirun of a sequence (in this case A002808) is an interval of positions at which consecutive terms differ by more than one.

Examples

			Row sums of:
   4   6   8
   9
  10  12  14
  15
  16  18  20
  21
  22  24
  25
  26
  27
  28  30  32
  33
  34
  35
  36  38
  39
  40  42  44
		

Crossrefs

Partial sums are a subset of A053767 (partial sums of composite numbers).
Functional neighbors: A005381, A054265, A068780, A373403, A373405, A373411, A373412.
A000040 lists the primes, differences A001223.
A002808 lists the composite numbers, differences A073783.
A046933 counts composite numbers between primes.
A065855 counts composite numbers up to n.

Programs

  • Mathematica
    Total/@Split[Select[Range[100],CompositeQ],#1+1!=#2&]//Most
Showing 1-10 of 27 results. Next