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.

User: , 1, __

, 1, __'s wiki page.

, 1, __ has authored 10 sequences.

A361502 Index of n-th prime in A359804.

Original entry on oeis.org

2, 3, 4, 8, 13, 42, 347, 3466, 49012, 528231, 717126, 63056215, 1375559400, 7038527851
Offset: 1

Author

N. J. A. Sloane, Mar 18 2023, based on a comment made by Michael De Vlieger in A359804 in which he gave the values of a(1) to a(12)

Keywords

Comments

Theorem: Every prime appears in A359804. For proof see A359804.
It appears that the primes in A359804 appear in order.

Crossrefs

Programs

  • Mathematica
    nn = 2^20; c[] = False; q[] = 1;
     i = 1; j = 2; c[1] = c[2] = True; u = 3;
     {2}~Join~Reap[Monitor[Do[
          (k = q[#]; While[c[k #], k++]; k *= #;
             While[c[# q[#]], q[#]++]) &[(p = 2;
            While[Divisible[i j, p], p = NextPrime[p]]; p)];
          If[PrimeQ[k], Sow[n]; Print[n]];
          Set[{c[k], i, j}, {True, j, k}];
    If[k == u, While[c[u], u++]], {n, 3, nn}], n]][[-1, -1]] (* Michael De Vlieger, Mar 19 2023 *)

Extensions

a(13)-a(14) from Rémy Sigrist, Mar 19 2023

A354168 Let M_p = 2^p-1 be a Mersenne prime, where p is an odd prime. Sequence lists p such that b_{p-2} == -2^((p+1)/2) mod M_p, where {b_k} is defined in the Comments.

Original entry on oeis.org

7, 17, 19, 89, 107, 521, 607, 1279, 2281, 3217, 4423, 9689, 11213, 21701, 44497, 216091, 859433, 1257787, 24036583, 30402457, 32582657, 42643801, 57885161, 74207281, 82589933
Offset: 1

Author

N. J. A. Sloane, Jun 02 2022, based on Section 16.1 of Cosgrave (2022)

Keywords

Comments

Let M_p = 2^p-1 (not necessarily a prime) where p is an odd prime, and define b_1 = 4; b_k = b_{k-1}^2 - 2 (mod M_p) for k >= 2.
The Lucas-Lehmer theorem says that M_p is a prime iff b_{p-1} == 0 (mod M_p).
Furthermore, if M_p is a prime, then b_{p-2} is congruent to +- 2^((p+1)/2) (mod M_p).
This partitions the Mersenne prime exponents A000043 into two classes, listed here and in A354167.

References

  • J. B. Cosgrave, A Mersenne-Wieferich Odyssey, Manuscript, May 2022. See Section 16.1.

Crossrefs

Cf. A123271 (sign of the penultimate term of the Lucas-Lehmer sequence).

Extensions

Thanks to Chai Wah Wu for several corrections. - N. J. A. Sloane, Jun 02 2022
a(16) from Chai Wah Wu, Jun 03 2022
a(17)-a(18) from Chai Wah Wu, Jun 04 2022
a(19)-a(25) from Serge Batalov, Jun 11 2022

A354167 Let M_p = 2^p-1 be a Mersenne prime, where p is an odd prime. Sequence lists p such that b_{p-2} == 2^((p+1)/2) mod M_p, where {b_k} is defined in the Comments.

Original entry on oeis.org

3, 5, 13, 31, 61, 127, 2203, 4253, 9941, 19937, 23209, 86243, 110503, 132049, 756839, 1398269, 2976221, 3021377, 6972593, 13466917, 20996011, 25964951, 37156667, 43112609, 77232917
Offset: 1

Author

N. J. A. Sloane, Jun 02 2022, based on Section 16.1 of Cosgrave (2022)

Keywords

Comments

Let M_p = 2^p-1 (not necessarily a prime) where p is an odd prime, and define b_1 = 4; b_k = b_{k-1}^2 - 2 (mod M_p) for k >= 2.
The Lucas-Lehmer theorem says that M_p is a prime iff b_{p-1} == 0 (mod M_p).
Furthermore, if M_p is a prime, then b_{p-2} is congruent to +- 2^((p+1)/2) (mod M_p).
This partitions the Mersenne prime exponents A000043 into two classes, listed here and in A354168.

References

  • J. B. Cosgrave, A Mersenne-Wieferich Odyssey, Manuscript, May 2022. See Section 16.1.

Crossrefs

Cf. A123271 (sign of the penultimate term of the Lucas-Lehmer sequence).

Extensions

Thanks to Chai Wah Wu for several corrections. - N. J. A. Sloane, Jun 02 2022
a(15) from Chai Wah Wu, Jun 04 2022
a(16)-a(25) from Serge Batalov, Jun 11 2022

A292766 Numbers n whose trajectory under iteration of the map k -> (sigma(k)+phi(k))/2 consists only of integers and is unbounded, excluding numbers n whose trajectory merges with the trajectory of a smaller number.

Original entry on oeis.org

270, 440, 496, 702, 737, 813, 828, 897, 905, 1027, 1066, 1099, 1240, 1241, 1260, 1331, 1353, 1368, 1371, 1422, 1507, 1537, 1754, 1760, 1834, 1848, 2002, 2016, 2282
Offset: 1

Author

N. J. A. Sloane, Sep 27 2017, based on emails from Sean A. Irvine, Sep 14 2017, who computed a(1)-a(9), and Hans Havermann, same date, who computed a(10)-a(29). Hugo Pfoertner also computed many of these terms

Keywords

Comments

These are the "seeds" in A291790, that is, every number which blows up under iteration of the map k -> (sigma(k)+phi(k))/2 belongs to one of these trajectories. AT PRESENT ALL TERMS ARE CONJECTURAL.
The trajectories of these numbers are pairwise disjoint for the first 400 steps.
This is unsatisfactory because it is possible that, at some later step, these trajectories may merge, reach a prime (a fixed point), or reach a fraction (and die). However, this seems unlikely on probabilistic grounds - see the remarks of Andrew R. Booker in A292108.
Normally such a sequence would not be included in the OEIS, but exceptions have been made for this and A291790 because a number of people have worked on them, and also in the hope that this will encourage resolution of some of the open questions.
Needs a b-file.

Crossrefs

A210493 Transits of Venus since the invention of the telescope by Julian Date (rounded).

Original entry on oeis.org

2317111, 2320030, 2364409, 2367328, 2405867, 2408786, 2453165, 2456085, 2458099, 2497542, 2541921, 2544841, 2583379, 2586298
Offset: 1

Author

Fred Espenak (fred.espenak-1(AT)nasa.gov) or (info01(AT)MrEclipse.com) and Robert G. Wilson v, Jan 23 2013

Keywords

Comments

"Transits of Venus are among the rarest of predictable astronomical phenomena. They occur in a pattern that generally repeats every 243 years, with pairs of transits eight years apart separated by long gaps of 121.5 years and 105.5 years. The periodicity is a reflection of the fact that the orbital periods of Earth and Venus are close to 8:13 and 243:395 commensurabilities." - Wikipedia
a(n) is approximately 365.25 * A171467(n+46). - Charles R Greathouse IV, Jan 24 2013

Examples

			05:19 07 Dec 1631 = 2317110.721528
18:25 04 Dec 1639 = 2320030.267361
05:19 06 Jun 1761 = 2364408.721528
22:25 03 Jun 1769 = 2367328.434028
04:05 09 Dec 1874 = 2405866.670139
17:06 06 Dec 1882 = 2408786.212500
08:19 08 Jun 2004 = 2453164.846528
01:28 06 Jun 2012 = 2456084.561111
02:48 11 Dec 2117 = 2458098.616667
16:01 08 Dec 2125 = 2497542.167361
11:30 11 Jun 2247 = 2541920.979167
04:36 09 Jun 2255 = 2544840.691667
01:40 13 Dec 2360 = 2583378.569444
14:43 10 Dec 2368 = 2586298.113194
		

References

  • Jean Meeus, Transits, Willmann-Bell, 1989.
  • Jean Meeus, Astronomical Algorithms, Second Ed., 1999.

Crossrefs

Cf. A171467.

A129935 Numbers n such that ceiling( 2/(2^(1/n)-1) ) is not equal to floor( 2n/log(2) ).

Original entry on oeis.org

777451915729368, 140894092055857794, 1526223088619171207, 3052446177238342414, 54545811706258836911039145, 624965662836733496131286135873807507, 1667672249427111806462471627630318921648499, 36465374036664559522628534720215805439659141
Offset: 1

Author

Richard Stanley, Apr 30 2007 (who sent a(1))

Keywords

Comments

If n belongs to this sequence and m = ceiling(2/(2^(1/n)-1)), then 0 < m/(2n) - 1/log(2) < (log(2)/3) * (1/(2n)^2) implying that m/(2n) is a convergent of 1/log(2) (note that m and 2n are not necessarily coprime). - Max Alekseyev, Jun 06 2007
From David Applegate, Jun 07 2007: (Start)
"Some background to Max Alekseyev's comments: The key point is that the Laurent series for 2/(2^(1/n)-1) about n=infinity is 2/log(2)*n - 1 + (1/6)*log(2)/n + O(1/n^3).
"Also, since 2/log(2) is irrational, 2n/log(2) is never integral, so floor(2n/log(2)) = ceiling(2n/log(2)-1).
"So the question becomes: when is 2n/log(2)-1 so close to an integer that 2/(2^(1/n)-1) is on the other side of the integer? That is why the continued fraction expansion of 2/log(2) is relevant." (End)
The appropriate generalization of ceiling(2/(2^(1/n)-1)) = ? floor(2n/log(2)) is floor(a/(b^(1/n)-1)+a/2) = ceiling(an/log(b)). When a=2, the a/2 can be hidden in floor() + 1 = ceiling(). - David Applegate, Jun 08 2007 [edited Jun 11 2007]

References

  • S. W. Golomb and A. W. Hales, "Hypercube Tic-Tac-Toe", in "More Games of No Chance", ed. R. J. Nowakowski, MSRI Publications 42, Cambridge University Press, 2002, pp. 167-182. Here it is stated that the first counterexample is at n=6847196937, an error due to faulty multiprecision arithmetic. The correct value was found by J. Buhler in 2004 and is reported in S. Golomb, "Martin Gardner and Tictacktoe," in Demaine, Demaine, and Rodgers, eds., A Lifetime of Puzzles, A K Peters, 2008, pp. 293-301.
  • Dean Hickerson, Email to Jon Perry and N. J. A. Sloane, Dec 16 2002. Gives first three terms: 777451915729368, 140894092055857794, 1526223088619171207, as well as five later terms. - N. J. A. Sloane, Apr 30 2014

Crossrefs

Cf. A078608 for the sequence ceiling( 2/(2^(1/n)-1) ).

Programs

  • Mathematica
    (* Mma 9.0.1 code from Bill Gosper, Mar 15 2013. He comments: "This reproduces the hundred values in the b-file, and probably works up to around half a billion digits. When Mathematica gets fixed, change 999999999 to infinity." *)
    $MaxExtraPrecision = 999999999; For[{lo = {0, 1}, hi = {1, 0}, nu = {0, 0}, n = 0}, nu[[2]] < 10^386, nu = lo + hi; For[{k = nu[[2]]}, Floor[k*2/Log[2]] != Ceiling[2/(2^(1/k) - 1)], k += nu[[2]], Print[{++n, k}]];
      If[nu[[1]]*Log[2] > 2*nu[[2]], hi = nu, lo = nu]]
  • PARI
    prec=1500;default(realprecision,prec);c=contfrac(log(2)/2);default(realprecision,prec*2+50); i=0;for(n=2,#c-1, cand=contfracpnqn(vecextract(c,2^n-1))[1,1];forstep(m=cand,c[n+1]*cand,cand, if(ceil(2/(2^(1/m)-1)) != floor(2*m/log(2)), i++;print(i" "m), break))) /* Phil Carmody, Mar 20 2013 */

Extensions

More terms from Max Alekseyev, Jun 06 2007
Edited by N. J. A. Sloane at the suggestion of Andrew S. Plewe, Jun 08 2007

A066724 a(1) = 1, a(2) = 2; for n > 1, a(n) is the least integer > a(n-1) such that the products a(i)*a(j) for 1 <= i < j <= n are all distinct.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 9, 11, 13, 16, 17, 19, 23, 25, 29, 30, 31, 37, 41, 43, 47, 49, 53, 59, 61, 67, 71, 73, 79, 81, 83, 84, 89, 97, 101, 103, 107, 109, 113, 121, 127, 128, 131, 137, 139, 149, 151, 154, 157, 163, 167, 169, 173, 179, 180, 181, 191, 193, 197, 199, 211
Offset: 1

Author

Robert E. Sawyer (rs.1(AT)mindspring.com), Jan 18 2002

Keywords

Comments

The first 15 terms are the same as A026477; the first 13 terms are the same as A026416.
Contains all primes. - Ivan Neretin, Mar 02 2016

Examples

			a(7) is not 10 because we already have 10 = 2*5. Of course all primes appear. a(14) is not 24 because if it were there would be a repeat among the terms a(i)*a(j) for 1 <= i < j <= 14, namely 3*16 = 2*24.
		

Crossrefs

Programs

  • Mathematica
    f[l_List] := Block[{k = 1, p = Times @@@ Subsets[l, {2}]},While[Intersection[p, l*k] != {}, k++ ];Append[l, k]];Nest[f, {1, 2}, 62] (* Ray Chandler, Feb 12 2007 *)

A078567 Number of arithmetic subsequences of [1..n] with length > 1.

Original entry on oeis.org

0, 1, 4, 9, 17, 27, 41, 57, 77, 100, 127, 156, 191, 228, 269, 314, 364, 416, 474, 534, 600, 670, 744, 820, 904, 991, 1082, 1177, 1278, 1381, 1492, 1605, 1724, 1847, 1974, 2105, 2245, 2387, 2533, 2683, 2841, 3001, 3169, 3339, 3515, 3697, 3883, 4071, 4269, 4470
Offset: 1

Author

Robert E. Sawyer (rs.1(AT)mindspring.com)

Keywords

Comments

The number of arithmetic subsequences of [1..n] with successive-term increment i and length k is n-i*(k-1) for i > 0, k > 0, n > i*(k-1).
Appears to be the partial sums of A006218. - N. J. A. Sloane, Nov 24 2008
The O(n^(1/2)) formula can be derived via Dirichlet hyperbola method (see Wikipedia link below) applied to a(n) = Sum_{k=1..n-1} Sum_{i*j=k} (sqrt(n)*sqrt(n)-i*j), where we've written the formula in this form to show which functions are being Dirichlet convoluted. - Daniel Hoying, May 31 2020
Apart from initial zero this is the convolution of A341062 and the nonzero terms of A000217. - Omar E. Pol, Feb 16 2021

Examples

			a(2): [1,2]; a(3): [1,2],[1,3],[2,3],[1,2,3].
		

Programs

  • Maple
    b:= proc(n) option remember; `if`(n<1, [0$2],
          (p-> p+[numtheory[tau](n), p[1]])(b(n-1)))
        end:
    a:= n-> b(n)[2]:
    seq(a(n), n=1..55);  # Alois P. Heinz, Oct 07 2021
  • Mathematica
    a[n_]:=-(-1 + n) n + Sum[-(1/2) Ceiling[n/(1 + k)] (-1 - k - 2 n + (1 + k) Ceiling[n/(1 + k)]), {k, 0, n - 2}]; (* Lorenz H. Menke, Jr., Feb 17 2017 *)
    Table[Sum[(n - i) DivisorSigma[0, i], {i, n}], {n, 47}] (* or *)
    With[{nn = 46}, {0}~Join~Table[First[ListConvolve @@ Transpose@ Take[#, n]], {n, nn}] &@ Table[{n, DivisorSigma[0, n]}, {n, nn}]] (* Michael De Vlieger, Feb 18 2017 *)
  • PARI
    a(n)=sum(i=1,n, numdiv(i)*(n-i)) \\ Charles R Greathouse IV, Feb 18 2017
    
  • PARI
    a(n)={n--; sqrtint(n)^2*(1/4 * (1+sqrtint(n))^2-n-1) + sum(i=1, sqrtint(n), (n\i)*(2*n + 2 - i*(1+n\i)))} \\ Andrew Howroyd, May 31 2020
    
  • Python
    from math import isqrt
    def A078567(n):
        m = isqrt(n-1)
        return m**2*(1+m)**2//4-m**2*n+sum((n-1)//i*(2*n-i*(1+(n-1)//i)) for i in range(1,m+1)) # Chai Wah Wu, Oct 07 2021

Formula

a(n) = Sum_{i=1..n-1} Sum_{j=1..floor((n-1)/i)} (n - i*j).
Convolution of A000027 and A000005. - Vladeta Jovovic, Apr 08 2006
Row sums of triangle A134546. - Gary W. Adamson, Oct 31 2007
a(n) = Sum_{i=1..n} (n-i) * A000005(i). - Wesley Ivan Hurt, May 08 2016
G.f.: (x/(1 - x)^2)*Sum_{k>=1} x^k/(1 - x^k). - Ilya Gutkovskiy, Jan 02 2017
a(n) = Sum_{k=1..n-1} Sum_{i=1..n-1} floor(k/i). - Wesley Ivan Hurt, Sep 14 2017
a(n) = Sum_{k=1..n-1} Sum_{i|k} (n-k). - Daniel Hoying, May 26 2020
a(n+1) = floor(sqrt(n))^2*(1/4*(1+floor(sqrt(n)))^2 - n - 1) + Sum_{i=1..floor(sqrt(n))} floor(n/i)*(2*n + 2 - i*(1+floor(n/i))). - Daniel Hoying, May 31 2020

A078651 Number of increasing geometric-progression subsequences of [1,...,n] with integral successive-term ratio and length >= 1.

Original entry on oeis.org

1, 3, 5, 9, 11, 15, 17, 23, 27, 31, 33, 40, 42, 46, 50, 59, 61, 68, 70, 77, 81, 85, 87, 97, 101, 105, 111, 118, 120, 128, 130, 141, 145, 149, 153, 165, 167, 171, 175, 185, 187, 195, 197, 204, 211, 215, 217, 231, 235, 242, 246, 253, 255, 265, 269, 279, 283, 287
Offset: 1

Author

Robert E. Sawyer (rs.1(AT)mindspring.com), Jan 08 2003

Keywords

Comments

The number of geometric-progression subsequences of [1,...,n] with integral successive-term ratio r and length k is floor(n/r^(k-1))(n > 0, r > 1, k > 0).

Examples

			a(1): [1]; a(2): [1],[2],[1,2]; a(3): [1],[2],[3],[1,2],[1,3].
		

Crossrefs

a(n) = n + A078632(n).
See A366471 for rational ratios.
See A078567 for APs.

Programs

  • Maple
    g := (n, b) -> local i; add(iquo(n, b^i), i = 1..floor(log(n, b))):
    a := n -> local b; n + add(g(n, b), b = 2..n):
    seq(a(n), n = 1..58);  # Peter Luschny, Apr 03 2025
  • Mathematica
    Accumulate[1 + Table[Total[IntegerExponent[n, Rest[Divisors[n]]]], {n, 100}]] (* Paolo Xausa, Aug 27 2025 *)

Formula

a(n) = n + Sum_{r > 1, j > 0} floor(n/r^j).

A078632 Number of geometric subsequences of [1,...,n] with integral successive-term ratio and length > 1.

Original entry on oeis.org

0, 1, 2, 5, 6, 9, 10, 15, 18, 21, 22, 28, 29, 32, 35, 43, 44, 50, 51, 57, 60, 63, 64, 73, 76, 79, 84, 90, 91, 98, 99, 109, 112, 115, 118, 129, 130, 133, 136, 145, 146, 153, 154, 160, 166, 169, 170, 183, 186, 192, 195, 201, 202, 211, 214, 223, 226, 229, 230, 242
Offset: 1

Author

Robert E. Sawyer (rs.1(AT)mindspring.com)

Keywords

Comments

The number of geometric subsequences of [1,...,n] with integral successive-term ratio r and length k is floor(n/r^(k-1))(n > 0, r > 1, k > 0).

Examples

			a(2): [1,2]; a(3): [1,2],[1,3]; a(4): [1,2],[1,3],[1,4],[2,4],[1,2,4].
		

Crossrefs

Cf. A078651.
Row sums of triangle A090623.
Partial sums of A309891.

Programs

  • Maple
    g := (n, b) -> local i; add(iquo(n, b^i), i = 1..floor(log(n, b))):
    a := n -> local b; add(g(n, b), b = 2..n):
    seq(a(n), n = 1..60);  # Peter Luschny, Apr 03 2025
  • Mathematica
    Accumulate[Table[Total[IntegerExponent[n, Rest[Divisors[n]]]], {n, 100}]] (* Paolo Xausa, Aug 27 2025 *)
  • PARI
    A078632(n) = {my(s=0, k=2); while(k<=n, s+=(n - sumdigits(n, k))/(k-1); k=k+1); s} \\ Zhuorui He, Aug 26 2025

Formula

a(n) = Sum_{r > 1, j > 0} floor(n/r^j).