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.

A283453 The smallest square referenced in A249025 (Numbers k such that 3^k - 1 is not squarefree).

Original entry on oeis.org

4, 4, 121, 4, 4, 4, 4, 4, 121, 4, 4, 4, 4, 4, 121, 4, 4, 4, 4, 4, 121, 4, 4, 169, 4, 4, 4, 121, 4, 4, 4, 4, 4, 121, 4, 4, 4, 4, 4, 121, 4, 4, 4, 4, 4, 121, 4, 4, 4, 4, 4, 121, 4, 4, 4, 4, 4, 121, 4, 4, 4, 4, 4, 121, 4, 4, 4, 4, 4, 121, 4, 169, 4, 4, 4, 4, 121
Offset: 1

Views

Author

Robert Price, Mar 07 2017

Keywords

Examples

			A249025(3)=5, 3^5-1 = 242 = 2*11*11. 242 is not squarefree the square being 11*11 = 121.
		

Crossrefs

Programs

  • Mathematica
    psq[n_] := If[(f = Select[FactorInteger[n], Last[#] > 1 &]) == {}, 1, f[[1, 1]]^2]; psq /@ Select[3^Range[100] - 1, !SquareFreeQ[#] &] (* Amiram Eldar, Feb 12 2021 *)
  • PARI
    lista(nn) = {for (n=1, nn, if (!issquarefree(k = 3^n-1), f = factor(k/core(k)); vsq = select(x->((x%2) == 0), f[,2], 1); print1(f[vsq[1], 1]^2, ", ");););} \\ Michel Marcus, Mar 11 2017

Formula

a(n) = A283454(n)^2. - Amiram Eldar, Feb 12 2021

Extensions

More terms from Michel Marcus, Mar 11 2017

A283620 a(n) is the least exponent k such that 3^k-1 is divisible by prime(n)^2, or -1 if no such k exists.

Original entry on oeis.org

2, -1, 20, 42, 5, 39, 272, 342, 253, 812, 930, 666, 328, 1806, 1081, 2756, 1711, 610, 1474, 2485, 876, 6162, 3403, 7832, 4656, 10100, 3502, 5671, 2943, 12656, 16002, 8515, 18632, 19182, 22052, 7550, 12246, 26406, 13861, 29756, 15931, 8145, 18145, 3088, 38612, 39402, 44310
Offset: 1

Views

Author

Michel Marcus, Mar 12 2017

Keywords

Comments

a(2) is -1, because 3^n-1 cannot be divisible by prime(2)=3.
For some terms, prime(n)^2 is also the least square of prime which divides 3^a(n)-1. This is the case for n=1, 5, 6, ..., that is, p=2, 11, 13, ... (see A283454).
If n <> 2, then a(n) = A062117(n) if 3^A062117(n) == 1 (mod prime(n)^2), or
prime(n)*A062117(n) if not. - Robert Israel, Mar 16 2017

Crossrefs

Programs

  • Maple
    subs(FAIL=-1,[seq(numtheory:-order(3, ithprime(i)^2), i=1..100)]); # Robert Israel, Mar 16 2017
  • Mathematica
    Join[{2,-1},Table[Module[{k=1},While[PowerMod[3,k,Prime[n]^2]!=1,k++];k],{n,3,50}]] (* Harvey P. Dale, Oct 22 2023 *)
  • PARI
    a(n) = if (n == 2, -1, k = 1; p = prime(n); while((3^k-1) % p^2, k++); k;);
Showing 1-2 of 2 results.