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 11-20 of 30 results. Next

A325610 Adjusted frequency depth of 2^n - 1.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, May 12 2019

Keywords

Comments

The adjusted frequency depth of a positive integer n is 0 if n = 1, and otherwise it is 1 plus the number of times one must apply A181819 to reach a prime number, where A181819(k = p^i*...*q^j) = prime(i)*...*prime(j) = product of primes indexed by the prime exponents of k. For example, 180 has adjusted frequency depth 5 because we have: 180 -> 18 -> 6 -> 4 -> 3.

Crossrefs

Programs

  • Mathematica
    fdadj[ptn_List]:=If[ptn=={},0,Length[NestWhileList[Sort[Length/@Split[#1]]&,ptn,Length[#1]>1&]]];
    Table[fdadj[2^n-1],{n,100}]

A325611 Number of nodes in the rooted tree with Matula-Goebel number 2^n - 1.

Original entry on oeis.org

1, 3, 4, 6, 6, 8, 7, 10, 10, 12, 12, 15, 12, 14, 16, 18, 14, 20, 16, 23, 20, 22, 22, 25, 25, 24, 23, 29, 26, 30, 27, 31, 33, 28, 32, 38, 36, 31, 36, 40, 37, 38, 33, 43, 44, 42, 39, 48, 39, 49, 45, 48, 43, 49, 49, 53, 47, 54, 47, 61
Offset: 1

Views

Author

Gus Wiseman, May 12 2019

Keywords

Comments

Every positive integer has a unique q-factorization (encoded by A324924) into factors q(i) = prime(i)/i, i > 0. For example:
11 = q(1) q(2) q(3) q(5)
50 = q(1)^3 q(2)^2 q(3)^2
360 = q(1)^6 q(2)^3 q(3)
Then a(n) is one plus the number of factors (counted with multiplicity) in the q-factorization of 2^n - 1.

Examples

			The rooted tree with Matula-Goebel number 2047 = 2^11 - 1 is (((o)(o))(ooo(o))), which has 12 nodes (o's plus brackets), so a(11) = 12.
		

Crossrefs

Matula-Goebel numbers: A007097, A061775, A109082, A109129, A196050, A317713.
Mersenne numbers: A046051, A046800, A059305, A325610, A325612, A325625.

Programs

  • Mathematica
    mgwt[n_]:=If[n==1,1,1+Total[Cases[FactorInteger[n],{p_,k_}:>mgwt[PrimePi[p]]*k]]];
    Table[mgwt[2^n-1],{n,30}]

A325625 Sorted prime signature of 2^n - 1.

Original entry on oeis.org

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, 1, 3, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1
Offset: 1

Views

Author

Gus Wiseman, May 13 2019

Keywords

Comments

The sorted prime signature of n is row n of A124010.

Examples

			We have 2^126 - 1 = 3^3 * 7^2 * 19 * 43 * 73 * 127 * 337 * 5419 * 92737 * 649657 * 77158673929, so row n = 126 is {1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3}.
Triangle begins:
  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 1 3
  1
  1 1 1 1 2
		

Crossrefs

Programs

  • Mathematica
    Table[Sort[Last/@FactorInteger[2^n-1]],{n,30}]

A277316 Prime-factorization representation of the prime-th Stern-polynomial: a(n) = A260443(A000040(n)).

Original entry on oeis.org

3, 6, 18, 30, 270, 450, 630, 6750, 9450, 22050, 2310, 3543750, 4961250, 53156250, 727650, 173643750, 25467750, 2668050, 40020750, 891371250, 9550406250, 1400726250, 3190703906250, 467969906250, 173423250, 16378946718750, 1715889656250, 245684200781250, 25738344843750, 8497739250, 510510, 6763506750, 66919696593750
Offset: 1

Views

Author

Antti Karttunen, Oct 10 2016

Keywords

Comments

If the conjecture by Ulas and Ulas is true, then all these terms can be found from A206284 and then this is also a subsequence of A277318.

Crossrefs

Cf. A277317 (same sequence sorted into ascending order) is a subsequence of A277319.
Differs from A277318 for the first time at n=10, where A277318(10) = 15750, a term which is missing from this sequence.

Programs

Formula

a(n) = A260443(A000040(n)).
Other identities.
For all n >= 1, a(A059305(n)) = A002110(A000043(n)).

A332210 Permutation of primes, inverse of A332211.

Original entry on oeis.org

2, 3, 7, 5, 13, 19, 23, 29, 31, 37, 11, 43, 47, 53, 61, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 131, 137, 139, 149, 17, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383
Offset: 1

Views

Author

Antti Karttunen, Feb 09 2020

Keywords

Comments

Sequence is well-defined also in case there are only a finite number of Mersenne primes.

Crossrefs

Used to construct permutations A332213, A332215.

Programs

  • PARI
    up_to = 127;
    A332210list(up_to) = { my(lista=List([]), xs=Map(), i=1, q, u); for(n=1,up_to, if(!isprime(q=((2^n)-1)), while(mapisdefined(xs,prime(i)), i++); q = prime(i)); mapput(xs,q,n)); for(i=1,oo,if(!mapisdefined(xs,prime(i),&u),return(Vec(lista)),listput(lista,prime(u)))); };
    \\ For computing a larger number of terms, use the precomputed values of A000043:
    v000043 = [2,3,5,7,13,17,19,31,61,89,107,127,521,607,1279, 2203,2281,3217,4253,4423,9689,9941,11213,19937, 21701,23209,44497,86243,110503,132049,216091, 756839,859433,1257787,1398269,2976221,3021377, 6972593,13466917,20996011,24036583,25964951, 30402457,32582657,37156667,42643801,43112609];
    A332210list(up_to) = { my(lista=List([]), xs=Map(), m000043 = Map(), i=1, q, u); for(k=1,#v000043,mapput(m000043,v000043[k],k)); for(n=1,min(up_to,v000043[#v000043]), if(mapisdefined(m000043,n), q = (2^n)-1, while(mapisdefined(xs,prime(i)), i++); q = prime(i)); mapput(xs,q,n)); for(i=1,oo,if(!mapisdefined(xs,prime(i),&u),return(Vec(lista)),listput(lista,prime(u)))); };
    v332210 = A332210list(up_to);
    A332210(n) = v332210[n];

Formula

For all applicable n >= 1, a(A059305(n)) = a(A000720(A000668(n))) = A000040(A000043(n)).

A335432 Number of anti-run permutations of the prime indices of Mersenne numbers A000225(n) = 2^n - 1.

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 1, 6, 2, 6, 2, 36, 1, 6, 6, 24, 1, 24, 1, 240, 6, 24, 2, 1800, 6, 6, 6, 720, 6, 1800, 1, 120, 24, 6, 24, 282240, 2, 6, 24, 15120, 2, 5760, 6, 5040, 720, 24, 6, 1451520, 2, 5040, 120, 5040, 6, 1800, 720, 40320, 24, 720, 2, 1117670400, 1, 6, 1800, 5040, 6
Offset: 1

Views

Author

Gus Wiseman, Jul 02 2020

Keywords

Comments

An anti-run is a sequence with no adjacent equal parts.
A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.

Examples

			The a(1) = 1 through a(10) = 6 permutations:
  ()  (2)  (4)  (2,3)  (11)  (2,4,2)  (31)  (2,3,7)  (21,4)  (11,2,5)
                (3,2)                       (2,7,3)  (4,21)  (11,5,2)
                                            (3,2,7)          (2,11,5)
                                            (3,7,2)          (2,5,11)
                                            (7,2,3)          (5,11,2)
                                            (7,3,2)          (5,2,11)
		

Crossrefs

The version for factorial numbers is A335407.
Anti-run compositions are A003242.
Anti-run patterns are A005649.
Permutations of prime indices are A008480.
Anti-runs are ranked by A333489.
Separable partitions are ranked by A335433.
Inseparable partitions are ranked by A335448.
Anti-run permutations of prime indices are A335452.
Strict permutations of prime indices are A335489.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Table[Length[Select[Permutations[primeMS[2^n-1]],!MatchQ[#,{_,x_,x_,_}]&]],{n,0,30}]
  • PARI
    \\ See A335452 for count.
    a(n) = {count(factor(2^n-1)[,2])} \\ Andrew Howroyd, Feb 03 2021

Formula

a(n) = A335452(A000225(n)).

Extensions

Terms a(51) and beyond from Andrew Howroyd, Feb 03 2021

A338133 Primitive nondeficient numbers sorted by largest prime factor then by increasing size. Irregular triangle T(n, k), n >= 2, k >= 1, read by rows, row n listing those with largest prime factor = prime(n).

Original entry on oeis.org

6, 20, 28, 70, 945, 1575, 2205, 88, 550, 3465, 5775, 7425, 8085, 12705, 104, 572, 650, 1430, 2002, 4095, 6435, 6825, 9555, 15015, 78975, 81081, 131625, 189189, 297297, 342225, 351351, 570375, 63126063, 99198099, 117234117, 272, 748, 1870, 2210, 5355, 8415, 8925, 11492
Offset: 2

Views

Author

David A. Corneth and Peter Munn, Oct 11 2020

Keywords

Comments

For definitions and further references/links, see A006039, the main entry for primitive nondeficient numbers.
Rows are finite: row n is a subset of the divisors of any of the products formed by multiplying 2^(A035100(n)-1) by a member of the first n finite sets described in the Dickson reference.
Column 1 includes the even perfect numbers.
The largest number in rows 2..n (therefore the largest that is prime(n)-smooth) is A338427(n). - Peter Munn, Sep 07 2021

Examples

			Row 1 is empty as there exists no primitive nondeficient number of the form prime(1)^k = 2^k.
Row 2 is (6) as 6 is the only primitive nondeficient number of the form prime(1)^k * prime(2)^m = 2^k * 3^m that is a multiple of prime(2) = 3.
Irregular triangle T(n, k) begins:
  n   prime(n)  row n
  2      3      6;
  3      5      20;
  4      7      28, 70, 945, 1575, 2205;
  5     11      88, 550, 3465, 5775, 7425, 8085, 12705;
  ...
See also the factorization of initial terms below:
      6 = 2 * 3,
     20 = 2^2 * 5,
     28 = 2^2 * 7,
     70 = 2 * 5 * 7,
    945 = 3^3 * 5 * 7,
   1575 = 3^2 * 5^2 * 7,
   2205 = 3^2 * 5 * 7^2,
     88 = 2^3 * 11,
    550 = 2 * 5^2 * 11,
   3465 = 3^2 * 5 * 7 * 11,
   5775 = 3 * 5^2 * 7 * 11,
   7425 = 3^3 * 5^2 * 11,
   8085 = 3 * 5 * 7^2 * 11,
  12705 = 3 * 5 * 7 * 11^2,
    104 = 2^3 * 13,
    572 = 2^2 * 11 * 13,
    650 = 2 * 5^2 * 13,
   1430 = 2 * 5 * 11 * 13,
   2002 = 2 * 7 * 11 * 13,
   4095 = 3^2 * 5 * 7 * 13,
  ...
		

Crossrefs

A000040, A006530 are used to define this sequence.
Permutation of A006039.
A047802\{12}, A308710 are subsequences.

Programs

  • PARI
    rownupto(n, u) = { my(res = List(), pr = primes(n), e = vector(n, i, logint(u, pr[i]))); vu = vector(n, i, [0, e[i]]); vu[n][1] = 1; forvec(x = vu, c = prod(i = 1, n, pr[i]^x[i]); if(c <= u && isprimitive(c), listput(res, c) ) ); Set(res) }
    isprimitive(n) = { my(f = factor(n), c); if(sigma(f) < 2*n, return(0)); for(i = 1, #f~, c = n / f[i,1]; if(sigma(c) >= c * 2, return(0) ) ); 1 }
    for(i = 2, 7, print(rownupto(i, 10^9)))

Formula

A006530(T(n, k)) = A000040(n).
T(n, 1) = A308710(n-1) [provided there is no least deficient number that is not a power of 2, as described in A000079].
For m >= 1, T(A059305(m), 1) = A000668(m) * 2^(A000043(m)-1) = A000668(m) * A061652(m).

A374481 The distance from prime(n) to the nearest common ancestor of prime(n) and 1+prime(n) in the Doudna-tree (A005940).

Original entry on oeis.org

0, 1, 1, 3, 3, 2, 6, 5, 7, 8, 10, 4, 10, 9, 13, 15, 15, 7, 12, 19, 9, 19, 20, 22, 24, 20, 21, 27, 26, 23, 30, 28, 25, 32, 34, 28, 15, 25, 36, 31, 39, 39, 41, 19, 41, 45, 31, 44, 42, 43, 46, 50, 52, 51, 42, 52, 55, 51, 25, 46, 41, 61, 61, 59, 28, 51, 44, 67, 60, 68, 55, 70, 64, 71, 69, 74, 73, 32, 61, 69, 79, 35, 82
Offset: 1

Views

Author

Antti Karttunen, Jul 09 2024

Keywords

Comments

Question: Is there any reasonable lower bound for this sequence?
Considering k that do not occur as terms of this sequence, see also A374214.

Crossrefs

Programs

  • PARI
    A374481(n) = A347381(prime(n));
    
  • PARI
    A241917(n) = if(isprime(n), primepi(n), if(1>=omega(n), 0, my(f=factor(n)); if(f[#f~,2]>1, 0, primepi(f[#f~,1])-primepi(f[(#f~)-1,1]))));
    A374481(n) = if(1==n,0,(-1+n-A241917(1+prime(n))));

Formula

a(n) = A347381(A000040(n)) = n - A348040(A000040(n), 1+A000040(n)).
For all n >= 1, a(A059305(n)) = A059305(n)-1.
If A319988(1+A000040(n)) then a(n) = n-1.
For n > 1, a(n) = n - A241917(1+prime(n)) - 1. - Peter Munn and Antti Karttunen, Jul 10 2024

A176559 The number of primes between two consecutive Mersenne primes.

Original entry on oeis.org

1, 6, 19, 996, 11222, 31138, 105054174, 55890483939986569, 10201730748372641087928204
Offset: 1

Views

Author

G. L. Honaker, Jr., Dec 07 2010

Keywords

Examples

			a(3) = 19 because between 3rd and fourth Mersenne primes (31 and 127) there are 19 primes (37, 41, 43, ... 113).
		

Crossrefs

Cf. A000040, A000668 (Mersenne primes), A059305.

Programs

  • Mathematica
    (* Run the program for A000668 first *) Table[-1 + PrimePi[A000668[[n + 1]]] - PrimePi[A000668[[n]]], {n, 7}] (* Alonso del Arte, Dec 07 2010 *)
    PrimePi[#[[2]]]-PrimePi[#[[1]]]&/@Partition[2^MersennePrimeExponent[Range[8]]-1,2,1]-1 (* The program generates the first 7 terms of the sequence. *) (* Harvey P. Dale, Jul 31 2025 *)

Formula

a(n) = A059305(n+1) - A059305(n) - 1. - Amiram Eldar, May 14 2023

Extensions

a(9) from the data at A059305 added by Amiram Eldar, May 14 2023

A168157 Number of 0's in the matrix whose lines are the binary expansion of the first n primes.

Original entry on oeis.org

1, 1, 4, 4, 9, 10, 19, 21, 22, 23, 23, 37, 40, 42, 43, 45, 46, 47, 69, 72, 76, 78, 81, 84, 88, 91, 93, 95, 97, 100, 100, 136, 141, 145, 149, 152, 155, 159, 162, 165, 168, 171, 172, 177, 181, 184, 187, 188, 191, 194, 197, 198, 201, 202, 263, 268, 273, 277, 282, 287
Offset: 1

Views

Author

M. F. Hasler, Nov 21 2009

Keywords

Comments

The matrix is to be taken of minimal size, i.e., have n lines and the number of columns needed to write the n-th prime in the last line, A035100(n). Otherwise said, there is no zero column except for n=1 (prime(1) = 2 = 10[2] in binary).
The number of zeros in the last line of the matrix is given by A035103(n).
One has a(n)=a(n-1) iff n = A059305(k) for some k, i.e. prime(n) is a Mersenne prime A000668(k) = A000225(A000043(k)).
If prime(n)=2^2^k+1 is a Fermat prime (A019434), n>2, then one has a(n)=a(n-1)+n-1+2^k-1.
More generally, the "big jumps" a(n+1) > a(n)+n happen whenever a column is added, i.e. when prime(n) = A014234(k) <=> prime(n+1) = A104080(k) for some k,n>1.

Examples

			a(4)=4 is the number of zeros in the matrix [010] /* = 2 in binary */ [011] /* = 3 in binary */ [101] /* = 5 in binary */ [111] /* = 7 in binary */
		

Programs

  • PARI
    A168157(n)=n*#binary(prime(n))-sum(i=1,n,norml2(binary(prime(i))))

Formula

a(n)=n*A035100(n)-A095375(n).
Previous Showing 11-20 of 30 results. Next