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: Jacques Tramu

Jacques Tramu's wiki page.

Jacques Tramu has authored 14 sequences. Here are the ten most recent ones:

A304437 Least x > 0 such that x^2 + y^2 = N^N for some y > 0 and N = A230486(n) (= those N having such a solution).

Original entry on oeis.org

10, 7584, 3198598, 1240110271, 776601600000, 5917593031349125, 20762422068404224, 62654932136711087245, 1088221106880000000000, 1589976606572135812562944, 387094246891633853991317879, 6160133339397357294397161472000, 12456283074641193962390812908965, 441379799993599287569478479003906250
Offset: 1

Author

M. F. Hasler (following an idea from Jacques Tramu), Sep 02 2018

Keywords

Comments

Sequence A230486 lists those N such that N^N is the sum of two nonzero squares. Here we list the smallest x which yields such a solution x^2 + y^2 = N^N, thus necessarily y >= x.

Examples

			See Examples in A230486.
		

Crossrefs

Programs

  • PARI
    for( n=1,199, if( t=sum2sqr(n^n), t[1][0]||(t=t[^1])||next;print1(t[1][1]","))) \\ See A133388 for sum2sqr().
    
  • Python
    from itertools import count, islice
    from sympy import primefactors
    from sympy.solvers.diophantine.diophantine import diop_DN
    def A304437_gen(startvalue=2): # generator of terms
        return map(lambda n:min(min(a,b) for a, b in diop_DN(-1,n**n) if a>0 and b>0), filter(lambda n:all(p&3==1 for p in primefactors(n)) if n&1 else any(p&3==1 for p in primefactors(n)),count(max(startvalue,2))))
    A304437_list = list(islice(A304437_gen(),20)) # Chai Wah Wu, May 15 2023

A302990 a(n) = index of first odd prime number in the (n-th)-order Fibonacci sequence Fn, or 0 if no such index exists.

Original entry on oeis.org

0, 0, 4, 6, 9, 10, 40, 14, 17, 19, 361, 23, 90, 26, 373, 47, 288, 34, 75, 38, 251, 43, 67, 47, 74, 310, 511, 151534, 57, 20608, 1146, 62, 197, 94246, 9974, 287, 271172, 758
Offset: 0

Author

Jacques Tramu, Apr 17 2018

Keywords

Comments

Fn is defined by: Fn(0) = Fn(1) = ... = Fn(n-2) = 0, Fn(n-1) = 1, and Fn(k+1) = Fn(k) + Fn(k-1) + ... + Fn(k-n+1).
In general, Fn(k) is odd iff k == -1 or -2 (mod n+1), therefore a(n) = k*(n+1) - (1 or 2) for all n. Since Fn(n-1) = F(n) = 1, we must have a(n) >= 2n. Since Fn(k) = 2^(k-n) for n <= k < 2n, Fn(2n) = 2^n-1, so a(n) = 2n exactly for the Mersenne prime exponents A000043, while a(n) = 2n+1 when n is not in A000043 but n+1 is in A050414. - M. F. Hasler, Apr 18 2018
Further terms of the sequence: a(38) > 62000, a(39) > 72000, a(40) = 285, a(41) > 178000, a(42) = 558, a(44) = 19529, a(46) = 33369, a(47) = 239, a(48) = 6368, a(53) = 2860, a(54) = 2418, a(58) = 176, a(59) = 18418, a(60) = 1463, a(61) = 122, a(62) = 8755, a(63) = 5118, a(64) = 25089, a(65) = 988, a(66) = 333, a(67) = 406, a(70) = 1632, a(74) = 374, a(76) = 13704, a(77) = 4991, a(86) = 347, a(89) = 178, a(92) = 1114, a(93) = 187, a(98) = 395, a(100) > 80000; a(n) > 10^4 for all other n up to 100. - Jacques Tramu and M. F. Hasler, Apr 18 2018

Examples

			a(2) = 4 because F2 (Fibonacci) = 0, 1, 1, 2, 3, 5, 8, ... and F2(4) = 3 is prime.
a(3) = 6 because F3 (tribonacci) = 0, 0, 1, 1, 2, 4, 7, 13, ... and F3(6) = 7 is prime.
a(4) = 9 because F4 (tetranacci) = 0, 0, 0, 1, 1, 2, 4, 8, 15, 29, 56, ...  and F4(9) = 29 is prime.
From _M. F. Hasler_, Apr 18 2018: (Start)
We see that Fn(k) = 2^(k-n) for n <= k < 2n and thus Fn(2n) = 2^n-1, so a(n) = 2n exactly for the Mersenne prime exponents A000043.
a(n) = 2n + 1 when 2^(n+1) - 3 is prime (n+1 in A050414) but 2^n-1 is not, i.e., n = 4, 8, 9, 11, 21, 23, 28, 93, 115, 121, 149, 173, 212, 220, 232, 265, 335, 451, 544, 688, 693, 849, 1735, ...
For other primes we have: a(29) = 687*30 - 2, a(37) = 20*38 - 2, a(41) > 10^4, a(43) > 10^4, a(47) = 5*48 - 1, a(53) = 53*54 - 2, a(59) = 307*60 - 2, a(67) = 6*67 - 1. (End)
		

Crossrefs

Cf. A000045 (F2), A000073 (F3), A000078 (F4), A001591 (F5), A001592 (F6), A122189(F7), A079262 (F8), A104144 (F9), A122265 (F10).
(According to the definition, F0 = A000004 and F1 = A000012.)
Cf. A001605 (indices of prime numbers in F2).

Programs

  • PARI
    A302990(n,L=oo,a=vector(n+1,i,if(i1 && for(i=-2+2*n+=1,L, ispseudoprime(a[i%n+1]=2*a[(i-1)%n+1]-a[i%n+1]) && return(i))} \\ Testing primality only for i%n>n-3 is not faster, even for large n. - M. F. Hasler, Apr 17 2018; improved Apr 18 2018

Formula

a(n) == -1 or -2 (mod n+1). a(n) >= 2n, with equality iff n is in A000043. a(n) <= 2n+1 for n+1 in A050414. - M. F. Hasler, Apr 18 2018

Extensions

a(29) from Jacques Tramu, Apr 19 2018
a(33) from Daniel Suteu, Apr 20 2018
a(36) from Jacques Tramu, Apr 25 2018

A302174 Smallest solution x of x^n + y^(n+1) = z^(n+2), x, y, z >= 1.

Original entry on oeis.org

1, 2, 27, 256, 472392, 262144, 13759414272, 4294967296, 4057816381784064
Offset: 0

Author

Jacques Tramu, Apr 07 2018

Keywords

Comments

From M. F. Hasler, Apr 13 2018: (Start)
Proofs for the upper limits given in the formula section:
For odd n = 2k-1, x = 2^(2*k^2) yields a solution with x^(2k-1) = y^(2k) = 1/2*z^(2k+1), y = 2^(k(2k-1)) and z = 2^(2k(k-1)+1), because 2*k^2*(2k-1) + 1 = (2k+1)*(2k(k-1)+1).
For even n = 2k, x = 2^(k*(2k+1))*3^(2k+2) yields a solution, with y = 2^(2*k^2)*3^(2k+1) and z = 2^(2*k^2-k+1)*3^(2k), because for the exponents of 3, (2k+1)^2 = (2k+2)2k + 1 and the factor 1+3 = 2^2 adds 2 to the (identical) exponent of 2 in x^(2k) and y^(2k+1), to factor as 2*k^2(2k+1) + 2 = (2k+2)(k(2k-1)+1). (End)

Examples

			1^0 + 3^1 = 2^2, therefore a(0) = 1.
2^1 + 5^2 = 3^3, so a(1) = 2. (No solution can have x = 1 because z^3 - 1 = (z - 1)(z^2 + z + 1) cannot be a square: if a = z - 1, then z^2 + z + 1 = a^2 + 3a + 3 is congruent to 3 modulo any factor of a, and a = 3b yields z^3 - 1 = 9*b*(3*b^2 + 3b + 1), the last factor being congruent to 1 modulo any factor of b, and cannot be a square.)
27^2 + 18^3 = 9^4, so a(2) = 27.
256^3 + 64^4 = 32^5, so a(3) = 256.
472392^4 + 52488^5 = 8748^6, so a(4) = 472392.
		

Crossrefs

Cf. A001105 (2*k^2), A060757 (4^k^2 = 2^(2k^2)), A000244 (3^k).
Conjectured to be a subsequence of A003586 (2^i*3^j).
Cf. A300564, A300565, A300566, A300567, A300568 (z^4 = x^2 + y^3, ..., z^8 = x^6 + y^7).

Formula

For odd n, a(n) <= 2^((n+1)^2/2); for even n, a(n) <= 2^(n*(n+1)/2)*3^(n+2).
We may conjecture that, for n > 4, a(n) is given by these upper limits.

Extensions

Extended to a(0) = 1 by M. F. Hasler, Apr 13 2018

A151986 Maximal number of moves in the glass worms (or vers de verres) game with n glasses before detecting a cycle.

Original entry on oeis.org

1, 2, 4, 7, 10, 13, 20, 22, 42, 43, 64, 65, 146, 147, 203, 239, 412, 413, 414, 415
Offset: 1

Author

Jacques Tramu, Mar 09 2009

Keywords

Comments

Suggested by a question from Eric Angelini.
See the Sequence Fans Mailing List link and also the Angelini link for further information.

Crossrefs

Cf. A151987.

Extensions

a(11) corrected by Joseph Myers, Sep 07 2009
Edited and terms a(12) to a(20) from Sep 2009 discussion added by Joseph Myers, Nov 12 2010

A151987 Number of legal starting configurations in the glass worms (or vers de verres) game with n glasses.

Original entry on oeis.org

1, 1, 3, 13, 64, 404, 2135, 21077, 111459, 1261637, 10767866, 111804384, 659105457, 18705101130
Offset: 0

Author

Jacques Tramu, Mar 09 2009

Keywords

Comments

Suggested by a question from Eric Angelini.
See the Sequence Fans Mailing List link and also the Angelini link for further information.
It is conjectured that a(n)~(n+1)^(n+1)/exp(n). [From Dennis Hou, May 05 2010]

Crossrefs

Cf. A151986.

Extensions

Offset corrected by Joseph Myers, Sep 07 2009
a(9) to a(13) from Joseph Myers, Sep 08 2009

A145065 a(n) = sum of primes <= n*10^9.

Original entry on oeis.org

24739512092254535, 95673602693282040, 211169315361937456, 370412807102643725, 572840944428163514, 818062002011808625, 1105720106635140803, 1435543734762318281, 1807310307011831228, 2220822432581729238, 2675837181777714162, 3172247016440147644
Offset: 1

Author

Jacques Tramu, Feb 20 2009

Keywords

Examples

			a(1) = 2 + 3 + 5 + ... + 999999937 = 24739512092254535.
		

Crossrefs

Programs

  • Mathematica
    k = 1; p = 2; s = 0; lst = {}; While[k < 10, While[p < 10^9*k, s = s + p; p = NextPrime@p]; k++; AppendTo[lst, s]; Print[{k - 1, s}]] (* Robert G. Wilson v, Jul 23 2010 *)
  • PARI
    A145065(n)=my(s=0);forprime(p=2,n*1e9,s+=p);s

Formula

a(n) = A179660(10*n). - R. J. Mathar, Aug 05 2010

Extensions

Extended by Charles R Greathouse IV, Jul 24 2009
Edited by N. J. A. Sloane, Jul 27 2010

A140489 Numbers that cannot be part of the trajectory of any number under repeated application of the map: n -> n + second-smallest number that does not divide n, unless they are the first term of the trajectory.

Original entry on oeis.org

1, 2, 3, 5, 12, 15, 17, 24, 27, 29, 35, 36, 39, 41, 45, 48, 51, 53, 60, 63, 65, 72, 75, 77, 84, 87, 89, 95, 96, 99, 101, 105, 108, 111, 113, 120, 123, 125, 132, 135, 137, 144, 147, 149, 155, 156, 159, 161, 165, 168, 171, 173, 180, 183, 185, 192, 195
Offset: 1

Author

Jacques Tramu, Jun 25 2008

Keywords

Crossrefs

A140494 Numbers that cannot be part of the trajectory of any number under repeated application of the map: n -> n + third-smallest number that does not divide n, unless they are the first term of the trajectory.

Original entry on oeis.org

1, 2, 3, 4, 6, 12, 18, 24, 28, 30, 36, 37, 40, 42, 46, 48, 49, 52, 54, 55, 60, 64, 66, 72, 78, 80, 84, 88, 90, 96, 97, 100, 102, 106, 108, 112, 114, 115, 120, 124, 126, 132, 133, 138, 144, 150, 156, 157, 160, 162, 166, 168, 172, 174, 175, 180, 184, 186, 192, 198, 200
Offset: 1

Author

Jacques Tramu, Jun 25 2008

Keywords

Crossrefs

Cf. A140485, A140486, A140487, A140488, A140489 (second-smallest sequences).
Cf. A140490, A140491, A140492, A140493 (third-smallest sequences).

Programs

  • PARI
    third(n) = {my(nb = 0, k = 1); while (nb != 3, if (n % k, nb++); if (nb != 3, k++);); k;}
    f(n) = n + third(n);
    canbe(n) = {for (k=1, n, if (k + third(k) == n, return (1));); return (0);}
    cannotbe(n) = 1 - canbe(n);
    lista(nn) = {for (n=1, nn, if (cannotbe(n), print1(n, ", ")););} \\ Michel Marcus, Oct 04 2018

Extensions

Corrected by Michel Marcus, Oct 04 2018

A140493 Trajectory of 4 under repeated application of the map: n -> n + third-smallest number that does not divide n.

Original entry on oeis.org

4, 10, 16, 22, 27, 32, 38, 43, 47, 51, 56, 62, 67, 71, 75, 81, 86, 91, 95, 99, 104, 110, 116, 122, 127, 131, 135, 141, 146, 151, 155, 159, 164, 170, 176, 182, 187, 191, 195, 201, 206, 211, 215, 219, 224, 230, 236, 242, 247, 251, 255, 261, 266, 271, 275, 279, 284, 290, 296
Offset: 1

Author

Jacques Tramu, Jun 25 2008

Keywords

Crossrefs

Cf. A140485, A140486, A140487, A140488, A140489 (second-smallest sequences).
Cf. A140491, A140492, A140493, A140494 (third-smallest sequences).

Programs

  • Mathematica
    NestList[Complement[Range[#+10],Divisors[#]][[3]]+#&,4,60] (* Harvey P. Dale, Aug 28 2023 *)
  • PARI
    third(n) = {my(nb = 0, k = 1); while (nb != 3, if (n % k, nb++); if (nb != 3, k++);); k;}
    f(n) = n + third(n);
    lista4(nn) = {a = 4; print1(a, ", "); for (n=2, nn, newa = f(a); print1(newa, ", "); a = f(a););} \\ Michel Marcus, Oct 04 2018

Formula

From Chai Wah Wu, Nov 14 2024: (Start)
A140490-A140493 all converge to the same trajectory.
a(n) = a(n-1) + a(n-12) - a(n-13) for n > 23.
G.f.: x*(x^22 + 2*x^21 + x^20 - x^19 - 2*x^18 - 2*x^14 - 2*x^13 + x^12 + 6*x^11 + 5*x^10 + 4*x^9 + 4*x^8 + 5*x^7 + 6*x^6 + 5*x^5 + 5*x^4 + 6*x^3 + 6*x^2 + 6*x + 4)/(x^13 - x^12 - x + 1). (End)

Extensions

More terms from Michel Marcus, Oct 04 2018

A140492 Trajectory of 3 under repeated application of the map: n -> n + third-smallest number that does not divide n.

Original entry on oeis.org

3, 8, 14, 19, 23, 27, 32, 38, 43, 47, 51, 56, 62, 67, 71, 75, 81, 86, 91, 95, 99, 104, 110, 116, 122, 127, 131, 135, 141, 146, 151, 155, 159, 164, 170, 176, 182, 187, 191, 195, 201, 206, 211, 215, 219, 224, 230, 236, 242, 247, 251, 255, 261, 266, 271, 275
Offset: 1

Author

Jacques Tramu, Jun 25 2008

Keywords

Crossrefs

Cf. A140485, A140486, A140487, A140488, A140489 (second-smallest sequences).
Cf. A140490, A140491, A140493, A140494 (third-smallest sequences).

Programs

  • Mathematica
    Join[{3},NestList[#+Complement[Range[#],Divisors[#]][[3]]&,8,50]] (* Harvey P. Dale, Apr 04 2015 *)
  • PARI
    third(n) = {my(nb = 0, k = 1); while (nb != 3, if (n % k, nb++); if (nb != 3, k++);); k;}
    f(n) = n + third(n);
    lista3(nn) = {a = 3; print1(a, ", "); for (n=2, nn, newa = f(a); print1(newa, ", "); a = f(a););} \\ Michel Marcus, Oct 04 2018

Formula

From Chai Wah Wu, Nov 14 2024: (Start)
A140490-A140493 all converge to the same trajectory.
a(n) = a(n-1) + a(n-12) - a(n-13) for n > 24.
G.f.: x*(x^23 + 2*x^22 + x^21 - x^20 - 2*x^19 + x^17 + 2*x^16 - x^15 - 2*x^14 + 3*x^12 + 5*x^11 + 4*x^10 + 4*x^9 + 5*x^8 + 6*x^7 + 5*x^6 + 4*x^5 + 4*x^4 + 5*x^3 + 6*x^2 + 5*x + 3)/(x^13 - x^12 - x + 1). (End)

Extensions

More terms from Harvey P. Dale, Apr 04 2015