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-4 of 4 results.

A252170 Smallest primitive prime factor of 12^n-1.

Original entry on oeis.org

11, 13, 157, 5, 22621, 7, 659, 89, 37, 19141, 23, 20593, 477517, 211, 61, 17, 2693651, 1657, 29043636306420266077, 85403261, 8177824843189, 57154490053, 47, 193, 303551, 79, 306829, 673, 59, 31, 373, 153953, 886381, 2551, 71, 73, 3933841, 3307
Offset: 1

Views

Author

Eric Chen, Dec 15 2014

Keywords

Comments

Also, smallest prime p such that 1/p has duodecimal period n.

Examples

			a(4) = 5 because 1/5 = 0.249724972497... and 5 is the smallest prime with period 4 in base 12.
a(5) = 22621 because 1/22621 = 0.0000100001... and 22621 is the smallest (in fact, the only one) prime with period 5 in base 12.
		

Crossrefs

Cf. A112927 (base 2), A143663 (base 3), A112092 (base 4), A143665 (base 5), A379639 (base 6), A379640 (base 7), A379641 (base 8), A379642 (base 9), A007138 (base 10), A379644 (base 11), A252170 (base 12).

Programs

  • Maple
    S:= {}:
    for n from 1 to 72 do
      F:= numtheory:-factorset(12^n-1) minus S;
      A[n]:= min(F);
      S:= S union F;
    od:
    seq(A[n], n=1..72);
  • Mathematica
    prms={}; Table[f=First/@FactorInteger[12^n-1]; p=Complement[f, prms]; prms=Join[prms, p]; If[p=={}, 1, First[p]], {n, 72}]
  • PARI
    listap(nn) = {prf = []; for (n=1, nn, vp = (factor(12^n-1)[,1])~; f = setminus(Set(vp), Set(prf)); prf = concat(prf, f); print1(vecmin(Vec(f)), ", "););} \\ Michel Marcus, Dec 15 2014; after A007138

Extensions

Edited by Max Alekseyev, Aug 26 2021

A246489 Duodecimal period of 1/(n-th prime) (0 by convention for the primes 2 and 3).

Original entry on oeis.org

0, 0, 4, 6, 1, 2, 16, 6, 11, 4, 30, 9, 40, 42, 23, 52, 29, 15, 66, 35, 36, 26, 41, 8, 16, 100, 102, 53, 54, 112, 126, 65, 136, 138, 148, 150, 3, 162, 83, 172, 89, 90, 95, 24, 196, 66, 14, 222, 113, 114, 8, 119, 120, 125, 256, 131, 268, 54, 138, 280
Offset: 1

Views

Author

Eric Chen, Nov 15 2014

Keywords

Comments

For p >= 5 (n >= 3): multiplicative order of 12 mod prime(n). - Joerg Arndt, Nov 15 2014

Examples

			For n=9, prime(9) = 23, 1/23 in base 12 is 0. 06316948421 06316948421 ..., which has period 11, so a(9) = 11.
		

Crossrefs

Cf. A002371 (decimal versions).

Programs

  • Maple
    with(numtheory):
    a:= n-> `if`(n<3, 0, order(12, ithprime(n))):
    seq(a(n), n=1..100);  # Alois P. Heinz, Nov 16 2014
  • PARI
    /* nonzero terms only: */
    forprime(p=5,10^3,print1(znorder(Mod(12,p)),", ")); \\ Joerg Arndt, Nov 15 2014

Formula

a(n) = A246004(prime(n)).

A249772 Period of the senary (base-6) representation of 1/n, or 0 if 1/n terminates.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 2, 0, 0, 1, 10, 0, 12, 2, 1, 0, 16, 0, 9, 1, 2, 10, 11, 0, 5, 12, 0, 2, 14, 1, 6, 0, 10, 16, 2, 0, 4, 9, 12, 1, 40, 2, 3, 10, 1, 11, 23, 0, 14, 5, 16, 12, 26, 0, 10, 2, 9, 14, 58, 1, 60, 6, 2, 0, 12, 10, 33, 16, 11, 2, 35, 0, 36, 4, 5, 9, 10, 12, 78, 1, 0, 40, 82, 2, 16
Offset: 1

Views

Author

Michal Kaczmarczyk, Dec 03 2014

Keywords

Examples

			a(7)=2, because 1/7 has senary period 2 (0.0505050505...).
		

Crossrefs

Cf. A051626 (base 10), A246004 (base 12).
With ones instead of zeros: A007737, A066799 (all bases as columns).

Programs

  • Mathematica
    f[n_] := Length[ RealDigits[1/n, 6][[1, -1]]]; Array[f, 85] (* Robert G. Wilson v, Jan 09 2015 *)

Extensions

More terms from Robert G. Wilson v, Jan 09 2015

A351912 Period of binary representation of 1/n, or 0 if 1/n terminates.

Original entry on oeis.org

0, 0, 2, 0, 4, 2, 3, 0, 6, 4, 10, 2, 12, 3, 4, 0, 8, 6, 18, 4, 6, 10, 11, 2, 20, 12, 18, 3, 28, 4, 5, 0, 10, 8, 12, 6, 36, 18, 12, 4, 20, 6, 14, 10, 12, 11, 23, 2, 21, 20, 8, 12, 52, 18, 20, 3, 18, 28, 58, 4, 60, 5, 6, 0, 12, 10, 66, 8, 22, 12, 35, 6, 9, 36, 20, 18, 30, 12, 39, 4, 54, 20, 82, 6
Offset: 1

Views

Author

Herbert Eberle, Mar 15 2022

Keywords

Comments

The difference from A007733 is that if n is a power of 2 this sequence has 0, whereas A007733(2^n) = 1.

Crossrefs

Cf. A007733, which is the main entry for this problem.
Cf. A242595.
Cf. A249772 (base 6), A051626 (decimal), A246004 (base 12).
Showing 1-4 of 4 results.