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 31-40 of 42 results. Next

A147645 Number of distinct Mersenne primes dividing n.

Original entry on oeis.org

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

Views

Author

Omar E. Pol, Nov 09 2008

Keywords

Comments

a(n) = m first occurs at n = A098918(m). - Robert Israel, Feb 03 2020

Examples

			a(21)=2 because 1, 3, 7 and 21 are divisors of 21. Then 21 has two divisors that are Mersenne primes (A000668): 3 and 7.
		

Crossrefs

Programs

  • Maple
    N:= 100: # for a(1)..a(N)
    V:= Vector(N):
    for i from 1 do
    m:= numtheory:-mersenne([i]);
    if m > N then break fi;
    for j from m by m to N do
        V[j]:= V[j]+1
    od od:
    convert(V,list); # Robert Israel, Feb 03 2020
  • PARI
    A147645(n) = { my(m=3,s=0); while(m<=n, s += (isprime(m)*!(n%m)); m += (m+1)); (s); }; \\ Antti Karttunen, May 12 2022

Formula

From Antti Karttunen, May 12 2022: (Start)
a(n) = A154402(n) - A353786(n)
a(n) = a(2*n) = a(A000265(n)).
a(n) <= A331410(n). (End)
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = A173898 = 0.516454... . - Amiram Eldar, Dec 31 2023

A161790 The positive integer n is included if 1 is the largest integer of the form {2^k - 1} to divide n.

Original entry on oeis.org

1, 2, 4, 5, 8, 10, 11, 13, 16, 17, 19, 20, 22, 23, 25, 26, 29, 32, 34, 37, 38, 40, 41, 43, 44, 46, 47, 50, 52, 53, 55, 58, 59, 61, 64, 65, 67, 68, 71, 73, 74, 76, 79, 80, 82, 83, 85, 86, 88, 89, 92, 94, 95, 97, 100, 101, 103, 104, 106, 107, 109, 110, 113, 115, 116, 118, 121, 122, 125, 128, 130, 131, 134, 136, 137, 139, 142, 143
Offset: 1

Views

Author

Leroy Quet, Jun 19 2009

Keywords

Comments

Numbers which are not multiple of 2^k-1, k > 1. Because 2^k-1 = 1+2+...+2^(k-1), these numbers are also not the sum of positive integers in a geometric progression with common ratio 2 (cf. the primes A000040 which satisfy a similar property with arithmetic progressions with common difference 2). - Jean-Christophe Hervé, Jun 19 2014
The asymptotic density of this sequence is 1 - Sum_{s subset of A000225 \ {0, 1}} (-1)^(card(s)+1)/LCM(s) = 0.54830... - Amiram Eldar, Jun 30 2025

Crossrefs

Cf. A000225, A382875 (complement).
Positions of ones in A154402, A161788 and A161789.

Programs

  • Mathematica
    DivisorList=Drop[Table[2^k-1,{k,1,20}],1]
    A161790=Union[Table[If[Length[Join[DivisorList,Drop[Divisors[n],1]]]==Length[Union[DivisorList,Drop[Divisors[n],1]]],n,],{n,1,5000}]]
    (* Second program: *)
    Position[Table[DivisorSum[n, 1 &, IntegerQ@ Log2[# + 1] &], {n, 143}], 1][[All, 1]] (* Michael De Vlieger, Jun 11 2018 *)
  • PARI
    isok(k) = forstep(i = logint(k+1, 2), 2, -1, if(k % (2^i-1) == 0, return(0))); 1; \\ Amiram Eldar, Jun 30 2025

Formula

A161788(a(n)) = A161789(a(n)) = 1.
Also A154402(a(n)) = 1. - Antti Karttunen, Jun 11 2018

A342339 Heinz numbers of the integer partitions counted by A342337, which have all adjacent parts (x, y) satisfying either x = y or x = 2y.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 16, 17, 18, 19, 21, 23, 24, 25, 27, 29, 31, 32, 36, 37, 41, 42, 43, 47, 48, 49, 53, 54, 59, 61, 63, 64, 65, 67, 71, 72, 73, 79, 81, 83, 84, 89, 96, 97, 101, 103, 107, 108, 109, 113, 121, 125, 126, 127, 128, 131, 133, 137
Offset: 1

Views

Author

Gus Wiseman, Mar 11 2021

Keywords

Comments

The Heinz number of a partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k), giving a bijective correspondence between positive integers and integer partitions.

Examples

			The sequence of terms together with their prime indices begins:
      1: {}            19: {8}             48: {1,1,1,1,2}
      2: {1}           21: {2,4}           49: {4,4}
      3: {2}           23: {9}             53: {16}
      4: {1,1}         24: {1,1,1,2}       54: {1,2,2,2}
      5: {3}           25: {3,3}           59: {17}
      6: {1,2}         27: {2,2,2}         61: {18}
      7: {4}           29: {10}            63: {2,2,4}
      8: {1,1,1}       31: {11}            64: {1,1,1,1,1,1}
      9: {2,2}         32: {1,1,1,1,1}     65: {3,6}
     11: {5}           36: {1,1,2,2}       67: {19}
     12: {1,1,2}       37: {12}            71: {20}
     13: {6}           41: {13}            72: {1,1,1,2,2}
     16: {1,1,1,1}     42: {1,2,4}         73: {21}
     17: {7}           43: {14}            79: {22}
     18: {1,2,2}       47: {15}            81: {2,2,2,2}
		

Crossrefs

The first condition alone gives A000961 (perfect powers).
The second condition alone is counted by A154402.
These partitions are counted by A342337.
A018819 counts partitions into powers of 2.
A000929 counts partitions with adjacent parts x >= 2y.
A002843 counts compositions with adjacent parts x <= 2y.
A045690 counts sets with maximum n in with adjacent elements y < 2x.
A224957 counts compositions with x <= 2y and y <= 2x (strict: A342342).
A274199 counts compositions with adjacent parts x < 2y.
A342094 counts partitions with adjacent x <= 2y (strict: A342095).
A342096 counts partitions without adjacent x >= 2y (strict: A342097).
A342098 counts partitions with adjacent parts x > 2y.
A342330 counts compositions with x < 2y and y < 2x (strict: A342341).
A342331 counts compositions with adjacent parts x = 2y or y = 2x.
A342332 counts compositions with adjacent parts x > 2y or y > 2x.
A342333 counts compositions with adjacent parts x >= 2y or y >= 2x.
A342334 counts compositions with adjacent parts x >= 2y or y > 2x.
A342335 counts compositions with adjacent parts x >= 2y or y = 2x.
A342338 counts compositions with adjacent parts x < 2y and y <= 2x.
A342342 counts strict compositions with adjacent parts x <= 2y and y <= 2x.

Programs

  • Mathematica
    Select[Range[100],With[{y=PrimePi/@First/@FactorInteger[#]},And@@Table[y[[i]]==y[[i-1]]||y[[i]]==2*y[[i-1]],{i,2,Length[y]}]]&]

A350330 Lexicographically earliest sequence of positive integers such that the Hankel matrix of any odd number of consecutive terms is invertible.

Original entry on oeis.org

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

Views

Author

Pontus von Brömssen, Dec 25 2021

Keywords

Comments

No linear relation of the form c_1*a(j) + ... + c_k*a(j+k-1) = 0, with at least one c_i nonzero, holds for k consecutive values of j.
Is a(n) <= 3 for all n? (It is true for n <= 400.) If not, what is the largest term? Or is the sequence unbounded?
There seems to be some regularity in the sequence of values of n for which a(n) > 2: 15, 29, 36, 51, 65, 71, 86, 100, ... . The first differences of these are: 14, 7, 15, 14, 6, 15, 14, 5, 15, 14, 3, 15, 14, 1, 15, 13, 11, 15, 14, 7, 15, 14, 5, 15, 14, 3, 15, 14, 1, ... . The differences are all less than or equal to 15, because A350364(15,2) = 0.
Agrees with A154402 for the first 20 terms, but differs on the 21st.

Examples

			a(15) = 3, because the Hankel matrix of (a(11), ..., a(15)) is
  [1  2   1  ]
  [2  1   2  ]
  [1  2 a(15)],
which is singular if a(15) = 1, and the Hankel matrix of (a(5), ..., a(15)) is
  [1  2  2  1  2   1  ]
  [2  2  1  2  1   1  ]
  [2  1  2  1  1   2  ]
  [1  2  1  1  2   1  ]
  [2  1  1  2  1   2  ]
  [1  1  2  1  2 a(15)],
which is singular if a(15) = 2, but if a(15) = 3 the Hankel matrix of (a(k), ..., a(15)) is invertible for all odd k <= 15.
		

Crossrefs

Programs

  • Python
    from sympy import Matrix
    from itertools import count
    def A350330_list(nmax):
        a=[]
        for n in range(nmax):
            a.append(next(k for k in count(1) if all(Matrix((n-r)//2+1,(n-r)//2+1,lambda i,j:(a[r:]+[k])[i+j]).det()!=0 for r in range(n-2,-1,-2))))
        return a
    
  • Python
    # Faster version using numpy instead of sympy.
    # Due to floating point errors, the results may be inaccurate for large n. Correctness verified up to n=400 for numpy 1.20.2.
    from numpy import array
    from numpy.linalg import det
    from itertools import count
    def A350330_list(nmax):
        a=[]
        for n in range(nmax):
            a.append(next(k for k in count(1) if all(abs(det(array([[(a[r:]+[k])[i+j] for j in range((n-r)//2+1)] for i in range((n-r)//2+1)])))>0.5 for r in range(n-2,-1,-2))))
        return a

A350845 Heinz numbers of integer partitions with at least two adjacent parts of quotient 2.

Original entry on oeis.org

6, 12, 18, 21, 24, 30, 36, 42, 48, 54, 60, 63, 65, 66, 72, 78, 84, 90, 96, 102, 108, 114, 120, 126, 130, 132, 133, 138, 144, 147, 150, 156, 162, 168, 174, 180, 186, 189, 192, 195, 198, 204, 210, 216, 222, 228, 231, 234, 240, 246, 252, 258, 260, 264, 266, 270
Offset: 1

Views

Author

Gus Wiseman, Jan 20 2022

Keywords

Comments

The Heinz number of a partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k), so these are numbers with at least two adjacent prime indices of quotient 1/2.

Examples

			The terms and corresponding partitions begin:
   6: (2,1)
  12: (2,1,1)
  18: (2,2,1)
  21: (4,2)
  24: (2,1,1,1)
  30: (3,2,1)
  36: (2,2,1,1)
  42: (4,2,1)
  48: (2,1,1,1,1)
  54: (2,2,2,1)
  60: (3,2,1,1)
  63: (4,2,2)
  65: (6,3)
  66: (5,2,1)
  72: (2,2,1,1,1)
  78: (6,2,1)
  84: (4,2,1,1)
  90: (3,2,2,1)
  96: (2,1,1,1,1,1)
		

Crossrefs

The complement is A350838, counted by A350837.
The strict complement is counted by A350840.
These partitions are counted by A350846.
A000041 = integer partitions.
A000045 = sets containing n with all differences > 2.
A056239 adds up prime indices, row sums of A112798, counted by A001222.
A116931 = partitions with no successions, ranked by A319630.
A116932 = partitions with differences != 1 or 2, strict A025157.
A323092 = double-free integer partitions, ranked by A320340.
A325160 ranks strict partitions with no successions, counted by A003114.
A350839 = partitions with gaps and conjugate gaps, ranked by A350841.

Programs

  • Mathematica
    primeptn[n_]:=If[n==1,{},Reverse[Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]]];
    Select[Range[100],MemberQ[Divide@@@Partition[primeptn[#],2,1],2]&]

A350846 Number of integer partitions of n with at least two adjacent parts of quotient 2.

Original entry on oeis.org

0, 0, 0, 1, 1, 2, 4, 5, 8, 12, 18, 25, 36, 48, 65, 89, 119, 157, 207, 269, 350, 448, 574, 729, 927, 1166, 1465, 1830, 2282, 2827, 3501, 4309, 5300, 6483, 7923, 9641, 11718, 14187, 17155, 20674, 24885, 29860, 35787, 42772, 51054, 60791, 72289, 85772, 101641
Offset: 0

Views

Author

Gus Wiseman, Jan 20 2022

Keywords

Examples

			The a(3) = 1 through a(9) = 12 partitions:
  (21)  (211)  (221)   (42)     (421)     (422)      (63)
               (2111)  (321)    (2221)    (521)      (621)
                       (2211)   (3211)    (3221)     (3321)
                       (21111)  (22111)   (4211)     (4221)
                                (211111)  (22211)    (5211)
                                          (32111)    (22221)
                                          (221111)   (32211)
                                          (2111111)  (42111)
                                                     (222111)
                                                     (321111)
                                                     (2211111)
                                                     (21111111)
		

Crossrefs

The complement is counted by A350837, strict A350840.
The complimentary additive version is A350842, strict A350844.
These partitions are ranked by A350845, complement A350838.
A000041 = integer partitions.
A323092 = double-free integer partitions, ranked by A320340.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n], MemberQ[Divide@@@Partition[#,2,1],2]&]],{n,0,30}]

A364675 Number of integer partitions of n whose nonzero first differences are a submultiset of the parts.

Original entry on oeis.org

1, 1, 2, 3, 4, 4, 7, 7, 10, 12, 15, 15, 26, 25, 35, 45, 55, 60, 86, 94, 126, 150, 186, 216, 288, 328, 407, 493, 610, 699, 896, 1030, 1269, 1500, 1816, 2130, 2620, 3029, 3654, 4300, 5165, 5984, 7222, 8368, 9976, 11637, 13771, 15960, 18978, 21896, 25815, 29915
Offset: 0

Views

Author

Gus Wiseman, Aug 04 2023

Keywords

Comments

Conjecture: For subsets of {1..n} instead of partitions of n we have A101925.
Conjecture: The strict version is A154402.

Examples

			The partition y = (3,2,1,1) has first differences (1,1,0), and (1,1) is a submultiset of y, so y is counted under a(7).
The a(1) = 1 through a(8) = 10 partitions:
  (1)  (2)   (3)    (4)     (5)      (6)       (7)        (8)
       (11)  (21)   (22)    (221)    (33)      (421)      (44)
             (111)  (211)   (2111)   (42)      (2221)     (422)
                    (1111)  (11111)  (222)     (3211)     (2222)
                                     (2211)    (22111)    (4211)
                                     (21111)   (211111)   (22211)
                                     (111111)  (1111111)  (32111)
                                                          (221111)
                                                          (2111111)
                                                          (11111111)
		

Crossrefs

For subsets of {1..n} we appear to have A101925, A364671, A364672.
The strict case (no differences of 0) appears to be A154402.
Starting with the distinct parts gives A342337.
For disjoint multisets: A363260, subsets A364463, strict A364464.
For overlapping multisets: A364467, ranks A364537, strict A364536.
For subsets instead of submultisets we have A364673.
A000041 counts integer partitions, strict A000009.
A008284 counts partitions by length, strict A008289.
A236912 counts sum-free partitions, complement A237113.
A325325 counts partitions with distinct first differences.

Programs

  • Mathematica
    submultQ[cap_,fat_] := And@@Function[i,Count[fat,i] >= Count[cap,i]] /@ Union[List@@cap];
    Table[Length[Select[IntegerPartitions[n], submultQ[Differences[Union[#]],#]&]], {n,0,30}]

A305436 Number of divisors of n of the form 2^k + 1 for k >= 0.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Jun 11 2018

Keywords

Comments

a(n) is the number of terms of A000051 that divide n.

Crossrefs

Cf. A000051, A209229, A292315 (positions of zeros), A305435, A323482.
Cf. also A154402.

Programs

Formula

a(n) = Sum_{d|n} A209229(d-1).
a(n) = A305435(n) + A209229(n-1).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = A323482 = 1.264499... . - Amiram Eldar, Dec 31 2023

A305426 Number of proper divisors of n of the form 2^k - 1 for k >= 1.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Jun 11 2018

Keywords

Comments

a(n) is the number of terms of A000225 less than n that divide n.

Crossrefs

Cf. also A305435.

Programs

  • Mathematica
    Table[DivisorSum[n, 1 &, And[IntegerQ@ Log2[# + 1], # < n] &], {n, 105}] (* Michael De Vlieger, Jun 11 2018 *)
  • PARI
    A209229(n) = (n && !bitand(n,n-1));
    A036987(n) = A209229(1+n);
    A305426(n) = sumdiv(n,d,(dA036987(d));

Formula

a(n) = Sum_{d|n, dA036987(d).
a(n) = A154402(n) - A036987(n).

A353786 Number of distinct nonprime numbers of the form 2^k - 1 that divide n.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2
Offset: 1

Views

Author

Antti Karttunen, May 12 2022

Keywords

Examples

			Divisors of 255 are [1, 3, 5, 15, 17, 51, 85, 255], of these of the form 2^k - 1 (A000225) are 1, 3, 15 and 255, but only three of them are counted (because 3 is a prime), therefore a(255) = 3.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := DivisorSum[n, 1 &, !PrimeQ[#] && # + 1 == 2^IntegerExponent[# + 1, 2] &]; Array[a, 120] (* Amiram Eldar, May 12 2022 *)
  • PARI
    A353786(n) = { my(m=1,s=0); while(m<=n, s += (!isprime(m))*!(n%m); m += (m+1)); (s); };

Formula

a(n) = A154402(n) - A147645(n).
a(n) = a(2*n) = a(A000265(n)).
For all primes p, a(p) = 1.
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Sum_{n>=2} 1/A135972(n) = A065442 - A173898 = 1.0902409734... . - Amiram Eldar, Dec 31 2023
Previous Showing 31-40 of 42 results. Next