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

A153801 Index of Mersenne number A000225 that is also Mersenne prime A000668, minus n-th prime: a(n) = A000043(n) - A000040(n).

Original entry on oeis.org

0, 0, 0, 0, 2, 4, 2, 12, 38, 60, 76, 90, 480, 564, 1232, 2150, 2222, 3156, 4186, 4352, 9616, 9862, 11130, 19848, 21604, 23108, 44394, 86136, 110394, 131936, 215964, 756708, 859296, 1257648, 1398120, 2976070, 3021220, 6972430, 13466750, 20995838, 24036404, 25964770
Offset: 1

Views

Author

Omar E. Pol, Jan 13 2009

Keywords

Crossrefs

Programs

  • Mathematica
    With[{max = 48}, MersennePrimeExponent[Range[max]] - Prime[Range[max]]] (* Amiram Eldar, Oct 21 2024 *)

Extensions

More terms from R. J. Mathar, Feb 19 2009
More terms from Jinyuan Wang, Mar 02 2020

A235490 Numbers such that none of their prime factors share common 1-bits in the same bit-position and when added (or "ored" or "xored") together, yield a term of A000225 (a binary "repunit").

Original entry on oeis.org

1, 3, 7, 10, 26, 31, 58, 122, 127, 1018, 2042, 8186, 8191, 32762, 131071, 524287, 2097146, 8388602, 33554426, 1073741818, 2147483647, 2305843009213693951, 618970019642690137449562111, 39614081257132168796771975162, 162259276829213363391578010288127, 166153499473114484112975882535043066
Offset: 1

Views

Author

Antti Karttunen, Jan 22 2014

Keywords

Comments

a(1) = 1 is included on the grounds that it has no prime factors, thus A001414(1)=0, and 0 is one of the terms of A000225, marking the "repunit of length zero".
After 1, the sequence is a union of A000668 (Mersenne primes) and semiprimes of the form 2*A050415. The terms were constructed from the data given in those two entries.

Examples

			7 is included, because it is a prime, and repunit in base-2: '111'.
10 is included, as 10=2*5, and when we add 2 ('10' in binary) and 5 ('101' in binary), we also get 7 ('111' in binary), without producing any carries.
		

Crossrefs

A238603 A sixth-order linear divisibility sequence related to A000225: a(n) := (1/105)*(2^(3*n) - 1)*(2^(4*n) - 1)/(2^n - 1).

Original entry on oeis.org

1, 51, 2847, 170391, 10555655, 664857063, 42215949223, 2691226507047, 171901443816999, 10990938133564455, 703076406514657319, 44985901769992495143, 2878746218051469266983, 184228512166784552153127, 11790264946382521291370535, 754565442462197107544125479
Offset: 1

Views

Author

Peter Bala, Mar 06 2014

Keywords

Comments

Let P and Q be relatively prime integers. The Lucas sequence U(n) (which depends on P and Q) is an integer sequence that satisfies the recurrence equation a(n) = P*a(n-1) - Q*a(n-2) with the initial conditions U(0) = 0, U(1) = 1. The sequence {U(n)}n>=1 is a strong divisibility sequence, i.e., gcd(U(n),U(m)) = |U(gcd(n,m))|. It follows that {U(n)} is a divisibility sequence, i.e., U(n) divides U(m) whenever n divides m and U(n) <> 0.
It can be shown that if p and q are a pair of relatively prime positive integers, and if U(n) never vanishes, then the sequence {U(p*n)*U(q*n)/U(n)}n>=1 is a linear divisibility sequence of order 2*min(p,q). For a proof and a generalization of this result see the Bala link.
Here we take p = 3 and q = 4 with P = 3 and Q = 2, for which U(n) is the sequence A000225 (sometimes called the Mersenne numbers), and normalize the sequence {U(3*n)*U(4*n)/U(n)}n>=1 to have the initial term 1.
For other sequences of this type see A238600, A238601 and A238602. See also A238536.

Examples

			G.f. = x + 51*x^2 + 2847*x^3 + 170391*x^4 + 10555655*x^5 + 664857063*x^6 + ... - _Michael Somos_, May 07 2017
		

Crossrefs

Programs

  • Magma
    [(1/105)*(64^n + 32^n + 16^n - 4^n - 2^n - 1): n in [1..50]]; // G. C. Greubel, Aug 07 2018
  • Maple
    seq(1/105*(2^(3*n)-1)*(2^(4*n)-1)/(2^n-1), n = 1..20);
  • Mathematica
    Table[(1/105)*(64^n + 32^n + 16^n - 4^n - 2^n - 1), {n, 1, 50}] (* G. C. Greubel, Aug 07 2018 *)
  • PARI
    {a(n) = if( n, (8^n - 1) * (16^n - 1) / (105 * (2^n - 1)), 0)}; /* Michael Somos, May 07 2017 */
    

Formula

a(n) = (1/105)*(64^n + 32^n + 16^n - 4^n - 2^n - 1).
O.g.f.: x*(4096*x^4 - 4352*x^3 + 1160*x^2 - 68*x + 1 )/( (1-x)*(1-2*x)(1-4*x)*(1-16*x)*(1-32*x)*(1-64*x) ).
The formula for a(n) may be used to define it for all n in Z, and then we have a(n) = -(64)^n * a(-n). - Michael Somos, May 07 2017

A266187 a(n) = A266196(A000225(n)); index of (2^n)-1 in A266195.

Original entry on oeis.org

1, 3, 8, 22, 49, 115, 258, 1040, 2610
Offset: 1

Views

Author

Antti Karttunen, Dec 26 2015

Keywords

Comments

A264982(a(n)) is the last term k in A264982 for which A070939(k) = n.

Crossrefs

Formula

a(n) = A266196(A000225(n)).

A300829 Positions of records in A303761 and in A303765; a(n) = A303766(A000225(n)).

Original entry on oeis.org

0, 1, 2, 4, 7, 12, 19, 30, 40, 56, 74, 89, 114, 130, 157, 180, 210, 253, 276, 318, 352, 388, 421, 457, 498, 557, 593, 644, 688, 734, 780, 823, 871, 919, 975, 1032, 1080, 1165, 1238, 1300, 1362, 1426, 1490, 1554, 1622, 1686, 1759, 1878, 1945, 2013, 2106, 2186, 2268, 2350, 2432, 2500, 2593, 2679, 2757, 2853, 2939, 3029
Offset: 0

Views

Author

Antti Karttunen, May 03 2018

Keywords

Crossrefs

Programs

Formula

a(n) = A303766(A000225(n)) = A303766((2^n)-1).
For n >= 0, A303761(a(n)) = A002110(n).
For n = 2 .. 79, A303761(1+a(n)) = A000040(n).

A320875 Least d > 0 such that both Q = M + 2d and R = M + (M^2-1)/(Q-M) are prime, where M = 2^n - 1 = A000225(n), or 0 if there is no such d.

Original entry on oeis.org

0, 1, 2, 1, 3, 8, 2, 0, 6, 4, 66, 16, 20, 0, 6, 1, 2720, 0, 32, 0, 164, 8, 0, 524288, 153, 3573184, 2097152, 7354396, 19436, 4517888, 672, 0, 174080, 0, 262146, 1984, 48, 0, 4194296, 79, 30720, 128, 1825866, 4188889, 194396, 27227248, 0, 16384, 723, 0, 265227072, 22771712, 13982720, 134217728, 59885796, 587144, 19436, 0, 17179869152, 8388608
Offset: 1

Views

Author

M. F. Hasler, Nov 11 2018

Keywords

Comments

It is easy to see that R can't be an integer unless M < Q < M^2 + M.
Nonzero terms yield primitive weird numbers (PWN) 2^(n-1)*Q*R, cf. A258882.
This idea was used by S. Kravitz in 1976 and 35 years later by students of CWU to find the largest known PWN, cf. links and A242025, A242993, A242998, A242999, A243003. The 226 digits mentioned in the news article correspond not to a PWN but to the prime R for a(381) = 5456. The corresponding prime Q = M(381) + 2*5456 is the 54th prime after M(381), and only the third one for which R is an integer. The 127 digit PWN they found earlier corresponds to a non-minimal solution d = 34008 for n = 109. (It is a matter of seconds to find many much larger solutions, see examples.) This news led to renewed interest in this topic and a series of recent research papers, see references in A258882 and A002975.
Sequences A242025, A242993, A242998, A242999, A243003 consider PWN of the form 2^(k-1)*Q*R(k,Q) where the prime Q is fixed to be a Mersenne prime A000668, and k is varied to find a prime R.
Zero terms do not mean that there aren't PWN of the form 2^(n-1)*p*q with M+1 = 2^n < p < 2M < q < M(M+1). For example, a(8) = 0, but there are A258333(8) = 53 weird numbers with such (p,q). However, the two primes never satisfy the relation (p-M)(q-M) = M^2-1 which is considered here for (Q,R). - M. F. Hasler, Nov 20 2018

Examples

			a(109) = 8436 yields a 62-digit prime R and a 127 digit PWN 2^108*Q*R.
a(381) = 5456 yields a 226-digit prime R and a 455 digit PWN 2^380*Q*R. (This and the preceding one are mentioned in the News articles, cf LINKS.)
a(391) = 16386 leads to a 231-digit prime R and a 466-digit PWN 2^390*Q*R.
a(409) = 12360 leads to a 242-digit prime R and a 488-digit PWN 2^408*Q*R.
a(421) = 1661 leads to a 250-digit prime R and a 504-digit PWN 2^420*Q*R.
a(430) = 10304 leads to a 255-digit prime R and a 514-digit PWN 2^429*Q*R.
a(441) = 36080 leads to a 261-digit prime R and a 526-digit PWN 2^440*Q*R.
a(505) = 20726 leads to a 300-digit prime R and a 604-digit PWN 2^504*Q*R.
		

Crossrefs

Cf. A258882, subsequence of A002975.
Cf. A242025, A242993, A242998, A242999, A243003 (all related to the case Q = 2^p-1 in A000668, p in A000043).

Programs

  • PARI
    a(n)={my(M=2^n-1,S=M^2-1); fordiv(S+!S,D, ispseudoprime(M+D)&& ispseudoprime(M+S/D)&& return(D/2))} \\ Much faster than the variant below, but requires increasingly more stack space (allocatemem()) for larger n.
    
  • PARI
    A320875(n,L=0)={my(M=2^n-1,S=M^2-1); forprime(Q=M+1,if(L,L,M<
    				

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

A064084 A multiplicative version of 2^n - 1 (A000225).

Original entry on oeis.org

1, 3, 7, 15, 31, 21, 127, 255, 511, 93, 2047, 105, 8191, 381, 217, 65535, 131071, 1533, 524287, 465, 889, 6141, 8388607, 1785, 33554431, 24573, 134217727, 1905, 536870911, 651, 2147483647, 4294967295, 14329, 393213, 3937, 7665, 137438953471, 1572861, 57337
Offset: 1

Views

Author

Jens Voß, Sep 04 2001

Keywords

Comments

Since n -> 2^n - 1 is an embedding of the ordered structure N = {1, 2, 3, ...} (the order being the "divides" relation) into itself, a(n) always divides A000225(n); the sequence of quotients of A000225 and a is A064085.

Examples

			a(6) = (2^2 - 1) * (2^3 - 1) = 21 since 6 = 2 * 3.
		

Crossrefs

Programs

  • Maple
    a:= n-> mul(2^(i[1]^i[2])-1, i=ifactors(n)[2]):
    seq(a(n), n=1..50);  # Alois P. Heinz, Jun 09 2014
  • Mathematica
    a[n_] := Times @@ (2^(Power @@@ FactorInteger[n]) - 1); Array[a, 40] (* Amiram Eldar, Aug 31 2023 *)
  • PARI
    a(n) = my(f=factor(n)); for (i=1, #f~, f[i,1] = 2^(f[i,1]^f[i,2])-1; f[i,2]=1); factorback(f); \\ Michel Marcus, Jun 09 2014

Formula

a(n) = (2^((p_1)^(e_1)) - 1) * ... * (2^((p_k)^(e_k)) - 1) where (p_1)^(e_1) * ... * (p_k)^(e_k) is the prime factorization of n.

Extensions

More terms from Michel Marcus, Jun 09 2014

A064085 Quotient of A000225 and A064084.

Original entry on oeis.org

1, 1, 1, 1, 1, 3, 1, 1, 1, 11, 1, 39, 1, 43, 151, 1, 1, 171, 1, 2255, 2359, 683, 1, 9399, 1, 2731, 1, 140911, 1, 1649373, 1, 1, 599479, 43691, 8727391, 8965359, 1, 174763, 9588151, 139090655, 1, 1649061309, 1, 572942063, 2221095391, 2796203, 1
Offset: 1

Views

Author

Jens Voß, Sep 04 2001

Keywords

Comments

a(n) is equal to 1 if and only if n is a prime power; the sequence of nontrivial values of a is A064086.

Crossrefs

Programs

  • Maple
    a:= n-> (2^n-1)/mul(2^(i[1]^i[2])-1, i=ifactors(n)[2]):
    seq(a(n), n=1..50);  # Alois P. Heinz, Jun 09 2014
  • Mathematica
    a[n_] := (2^n-1)/Times @@ (2^(Power @@@ FactorInteger[n])-1);
    Table[a[n], {n, 1, 50}] (* Jean-François Alcover, Jan 13 2025 *)

Formula

a(n) = A000225(n) / A064084(n).

Extensions

More terms from Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Mar 29 2003

A366370 Square array A(n,k) giving the length of the least significant run of 0-bits in binary expansion of A000225(n)^k, or 0 if A000225(n)^k is a binary repunit.

Original entry on oeis.org

0, 0, 0, 0, 2, 0, 0, 1, 3, 0, 0, 3, 1, 4, 0, 0, 2, 4, 1, 5, 0, 0, 2, 2, 5, 1, 6, 0, 0, 1, 3, 2, 6, 1, 7, 0, 0, 4, 1, 4, 2, 7, 1, 8, 0, 0, 3, 5, 1, 5, 2, 8, 1, 9, 0, 0, 2, 3, 6, 1, 6, 2, 9, 1, 10, 0, 0, 1, 3, 3, 7, 1, 7, 2, 10, 1, 11, 0, 0, 3, 1, 4, 3, 8, 1, 8, 2, 11, 1, 12, 0, 0, 2, 4, 1, 5, 3, 9, 1, 9, 2, 12, 1, 13, 0
Offset: 1

Views

Author

Antti Karttunen, Oct 14 2023

Keywords

Examples

			The top left corner of the square array:
  n\k| 1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15, 16, 17
-----+-------------------------------------------------------------------
   1 | 0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
   2 | 0,  2,  1,  3,  2,  2,  1,  4,  3,  2,  1,  3,  2,  2,  1,  5,  4,
   3 | 0,  3,  1,  4,  2,  3,  1,  5,  3,  3,  1,  4,  2,  3,  1,  6,  4,
   4 | 0,  4,  1,  5,  2,  4,  1,  6,  3,  4,  1,  5,  2,  4,  1,  7,  4,
   5 | 0,  5,  1,  6,  2,  5,  1,  7,  3,  5,  1,  6,  2,  5,  1,  8,  4,
   6 | 0,  6,  1,  7,  2,  6,  1,  8,  3,  6,  1,  7,  2,  6,  1,  9,  4,
   7 | 0,  7,  1,  8,  2,  7,  1,  9,  3,  7,  1,  8,  2,  7,  1, 10,  4,
   8 | 0,  8,  1,  9,  2,  8,  1, 10,  3,  8,  1,  9,  2,  8,  1, 11,  4,
   9 | 0,  9,  1, 10,  2,  9,  1, 11,  3,  9,  1, 10,  2,  9,  1, 12,  4,
  10 | 0, 10,  1, 11,  2, 10,  1, 12,  3, 10,  1, 11,  2, 10,  1, 13,  4,
  11 | 0, 11,  1, 12,  2, 11,  1, 13,  3, 11,  1, 12,  2, 11,  1, 14,  4,
  12 | 0, 12,  1, 13,  2, 12,  1, 14,  3, 12,  1, 13,  2, 12,  1, 15,  4,
  13 | 0, 13,  1, 14,  2, 13,  1, 15,  3, 13,  1, 14,  2, 13,  1, 16,  4,
  14 | 0, 14,  1, 15,  2, 14,  1, 16,  3, 14,  1, 15,  2, 14,  1, 17,  4,
  15 | 0, 15,  1, 16,  2, 15,  1, 17,  3, 15,  1, 16,  2, 15,  1, 18,  4,
  16 | 0, 16,  1, 17,  2, 16,  1, 18,  3, 16,  1, 17,  2, 16,  1, 19,  4,
  17 | 0, 17,  1, 18,  2, 17,  1, 19,  3, 17,  1, 18,  2, 17,  1, 20,  4,
etc.
A000225(4)^4 = ((2^4)-1)^4 = 50625 and A007088(50625) = "1100010111000001", where the rightmost run of 0-bits has length 5, therefore A(4,4) = 5.
A000225(3)^5 = ((2^3)-1)^5 = 16807 and A007088(16807) = "100000110100111", where the rightmost run of 0-bits has length 2, therefore A(3,5) = 2.
A000225(5)^3 = ((2^5)-1)^3 = 29791 and A007088(29791) = "111010001011111", where the rightmost run of 0-bits is a singleton, therefore A(5,3) = 1.
		

Crossrefs

Programs

  • Mathematica
    A285097[n_]:=If[DigitCount[n,2,1]<2,0,IntegerExponent[BitAnd[n-1,n],2]-IntegerExponent[n,2]];A366370[n_,k_]:=A285097[1+(2^n-1)^k];
    Table[A366370[k,n-k+1],{n,20},{k,n}] (* Paolo Xausa, Dec 02 2023 *)
  • PARI
    up_to = 105;
    A285097(n) = if(!n || !bitand(n,n-1), 0, valuation((n>>valuation(n,2))-1, 2));
    A366370sq(n,k) = A285097(1+(((2^n)-1)^k));
    \\ Or more directly as:
    A366370sq(n,k) = if(1==n||1==k, 0, if(!(k%2), n, 1)+valuation(k>>1,2));
    A366370list(up_to) = { my(v = vector(up_to), i=0); for(a=1,oo, for(col=1,a, i++; if(i > up_to, return(v)); v[i] = A366370sq(col,(a-(col-1))))); (v); };
    v366370 = A366370list(up_to);
    A366370(n) = v366370[n];

Formula

A(n,k) = A285097(1+(A000225(n)^k)).
For all n >= 2, k >= 2, A(n,2k) = n+A007814(k), A(n,2k+1) = 1+A007814(k).
Previous Showing 11-20 of 1353 results. Next