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.

Showing 1-2 of 2 results.

A318761 Composite k that divides 2^(k-2) + 3^(k-2) + 6^(k-2) - 1.

Original entry on oeis.org

4, 6, 8, 12, 24, 25, 125, 174, 228, 276, 325, 348, 451, 1032, 1105, 1128, 1729, 2388, 2465, 2701, 2821, 3721, 5272, 5365, 6601, 8911, 10585, 12025, 12673, 15841, 18721, 22681, 23585, 23725, 29341, 31621, 32376, 35016, 35425, 41041, 41125, 46632, 46657, 47125
Offset: 1

Views

Author

Jianing Song, Sep 02 2018

Keywords

Comments

Note that for primes p >= 5, p always divides 2^(p-2) + 3^(p-2) + 6^(p-2) - 1 (see A318760).
It's interesting to study the squares of primes in this sequence. For primes p >= 5, x^(p^2-2) == x^(p-2) (mod p^2) for any integer x, so p^2 is a term if and only if p^2 divides 2^(p-2) + 3^(p-2) + 6^(p-2) - 1. It's easy to see that for any prime p, p^2 is a term of this sequence if and only if p is in A238201 and p != 3 (p = 2, 5, 61, 1680023, 7308036881, there are no others up to 7*10^10). - Jianing Song, Dec 25 2018

Examples

			(2^10 + 3^10 + 6^10 - 1)/12 = 5403854 which is an integer, so 12 is a term.
(2^22 + 3^22 + 6^22 - 1)/24 = 5484238967813377 which is also an integer, so 24 is a term.
		

Crossrefs

A052155 is a proper subsequence.

Programs

  • Mathematica
    Select[Range[48000], CompositeQ[#] && Mod[Sum[PowerMod[k, #-2, #],{k, {2, 3, 6}}], #] == 1 &] (* Amiram Eldar, Jul 17 2024 *)
  • PARI
    b(n) = lift(Mod(2, n)^(n-2) + Mod(3, n)^(n-2) + Mod(6, n)^(n-2));
    for(n=2, 30000, if(isprime(n)==0&&b(n)==1, print1(n, ", ")))

A330170 a(n) = 2^n + 3^n + 6^n - 1.

Original entry on oeis.org

10, 48, 250, 1392, 8050, 47448, 282250, 1686432, 10097890, 60526248, 362976250, 2177317872, 13062296530, 78368963448, 470199366250, 2821153019712, 16926788715970, 101560344351048, 609360902796250, 3656161927895952, 21936961102828210
Offset: 1

Views

Author

Bernard Schott, Dec 04 2019

Keywords

Comments

This sequence is the subject of the 4th problem, proposed by Poland, of the 46th International Mathematical Olympiad in 2005 at Mérida (Mexico) [see the link IMO].
Answer to the question: 1 is the only positive integer that is relatively prime to every term of the sequence.
Proof: p=2 divides a(1) = 10, p=3 divides a(2) = 48, and if p prime >= 5, then p divides a(p-2). So, for every prime p, there exists n >= 1 such that p divides a(n).

Examples

			a(9) = 2^9 + 3^9 + 6^9 - 1 = 10097890 = 11 * 917990.
		

Crossrefs

Cf. A000079 (2^n), A000244 (3^n), A000400 (6^n), A318760 (a(p-2)/p).

Programs

  • Maple
    A330170 := seq(2^n+3^n+6^n-1, n=1..50);
  • Mathematica
    Table[2^n + 3^n + 6^n - 1, {n, 1, 21}] (* Amiram Eldar, Dec 04 2019 *)
  • PARI
    Vec(2*x*(5 - 36*x + 72*x^2 - 36*x^3) / ((1 - x)*(1 - 2*x)*(1 - 3*x)*(1 - 6*x)) + O(x^40)) \\ Colin Barker, Dec 04 2019

Formula

a(n) = A000079(n) + A000244(n) + A000400(n) - 1.
From Colin Barker, Dec 04 2019: (Start)
G.f.: 2*x*(5 - 36*x + 72*x^2 - 36*x^3) / ((1 - x)*(1 - 2*x)*(1 - 3*x)*(1 - 6*x)).
a(n) = 12*a(n-1) - 47*a(n-2) + 72*a(n-3) - 36*a(n-4) for n>5.
(End)
Showing 1-2 of 2 results.