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.

Previous Showing 41-50 of 62 results. Next

A231372 Squarefree composite numbers k such that 10 is a primitive root for all prime factors of k.

Original entry on oeis.org

119, 133, 161, 203, 323, 329, 391, 413, 427, 437, 493, 551, 667, 679, 763, 791, 799, 893, 917, 1003, 1037, 1043, 1081, 1121, 1159, 1169, 1253, 1267, 1351, 1357, 1363, 1403, 1561, 1603, 1631, 1649, 1711, 1769, 1799, 1841, 1843, 1853, 1883, 1921, 2071, 2147, 2191
Offset: 1

Views

Author

Arkadiusz Wesolowski, Nov 08 2013

Keywords

Comments

If k is the smallest integer satisfying 10^k == 1 (mod p), we say that 10 has order k (mod p). If n is the product of distinct primes p_i, the period of 1/n in base b is the least common multiple of the orders of b (mod p_i), provided b and n are relatively prime.

Crossrefs

Subsequence of A024556.

Programs

  • Mathematica
    q[n_] := CompositeQ[n] && SquareFreeQ[n] && AllTrue[FactorInteger[n][[;;,1]],  MultiplicativeOrder[10, #] == # - 1 &]; Select[Range[2000], q] (* Amiram Eldar, Oct 03 2021 *)

A158248 Composite numbers with primitive root 10.

Original entry on oeis.org

49, 289, 343, 361, 529, 841, 2209, 2401, 3481, 3721, 4913, 6859, 9409, 11881, 12167, 12769, 16807, 17161, 22201, 24389, 27889, 32041, 32761, 37249, 49729, 52441, 54289, 66049, 69169, 72361, 83521, 97969
Offset: 1

Views

Author

Robert Hutchins, Mar 15 2009

Keywords

Comments

Previous name was: Numbers m whose reciprocal generates a repeating decimal fraction with period phi(m) and m/2 < phi(m) < m-1.
All terms are proper powers of full reptend primes (A001913).
This sequence does not contain every proper power of every term in A001913, for example, A001913 has 487 as its 26th term, but since 10 is not a primitive root of 487^2, 487^2 is not a term of this sequence. - Robert Hutchins, Oct 14 2021
A shorter description appears to be "Composite numbers with primitive root 10". - Arkadiusz Wesolowski, Jul 04 2012 (The two definitions certainly produce the same terms up through 83521. - N. J. A. Sloane, Jul 05 2012)

Crossrefs

Subsequence of A244623.
Subsequence of A167797.
Cf. A108989 (for base 2), A346316 (for base 6).

Programs

  • Maple
    select(n -> not isprime(n) and numtheory:-primroot(9,n) = 10,[$2..10000]);
    # N. J. A. Sloane, Jul 05 2012
  • Mathematica
    Select[Range[10^5], GCD[10, #] == 1 && #/2 < MultiplicativeOrder[10, #] < # - 1 &] (* Ray Chandler, Oct 17 2012 *)

Extensions

More terms from Robert Hutchins, Mar 21 2009
Entry revised by N. J. A. Sloane, Jul 05 2012
New name (using comment by Arkadiusz Wesolowski) from Joerg Arndt, Nov 22 2021

A221982 Primes p == 2 (mod 5) for which 4*p+1 is also prime.

Original entry on oeis.org

7, 37, 67, 97, 127, 277, 307, 487, 577, 727, 997, 1087, 1297, 1327, 1567, 1597, 1777, 1987, 2017, 2437, 2647, 2677, 2767, 2887, 3037, 3067, 3307, 3457, 3637, 3907, 4057, 4297, 4447, 4567, 4987, 5197, 5527, 5557, 6007, 6247, 6337, 6367, 6397, 6547, 6577, 7027, 7057, 7237, 7417, 7507, 7717, 7867
Offset: 1

Views

Author

Jonathan Sondow, Feb 02 2013

Keywords

Comments

The corresponding primes 4*p+1 are Chebyshev's subsequence A221981 of the primes with primitive root 10.

Examples

			7 is a member because 7 == 2 (mod 5) and 29 = 4*7 + 1 are both prime.
		

References

  • P. L. Chebyshev, Theory of congruences. Elements of number theory, Chelsea, 1972, p. 306.
  • R. K. Guy, Unsolved Problems in Number Theory, F9.

Crossrefs

Programs

  • Maple
    A221982:=proc(q)
    local n;
    for n from 1 to q do
    if isprime(n) and isprime(4*n+1) and (n mod 5)=2 then print(n) fi; od; end:
    A221982 (10000); # Paolo P. Lava, Feb 12 2013
  • Mathematica
    Select[ Prime[ Range[1000]], Mod[#, 5] == 2 && PrimeQ[4 # + 1] &]

Formula

a(n) = (A221981(n) - 1)/4.

A232451 Number of prime divisors of (10^(n+3) + 666)*10^(n+1) + 1 (see A232449) counted with multiplicity.

Original entry on oeis.org

1, 2, 2, 3, 4, 3, 5, 4, 2, 5, 5, 4, 3, 1, 2, 3, 6, 4, 3, 6, 4, 2, 4, 5, 2, 4, 3, 6, 7, 7, 4, 3, 2, 4, 5, 3, 4, 7, 4, 6, 6, 4, 1, 4, 5, 4, 6, 6, 5, 3, 6, 4, 6, 6, 4, 11, 6, 6, 6, 4, 5, 5, 2, 6, 7
Offset: 0

Views

Author

Stanislav Sykora, Nov 24 2013

Keywords

Comments

The Belphegor numbers (A232449), though large and rarely prime (A232448), tend to contain only very few prime factors. One wonders whether this sequence might be bounded.
From Robert Israel, Feb 23 2017: (Start)
The sequence is unbounded.
Indeed, if p is in A001913 such that the polynomial 10^4 x^2 + 6660 x + 1 has a simple root mod p, then for all k there exist Belphegor numbers divisible by p^k.
For example, p=29 works; we have A232449(n) divisible by 29^k for n = 6, 158, 5522, 41570, 8153130, 107172470, 3553045502, 136793469406, 2761185750502, 142830181379582, ...
(End)

Crossrefs

Cf. A001913, A232448 (indices of Belphegor primes), A232449 (Belphegor numbers), A232450 (largest prime factor of A232449(n)).

Programs

  • Magma
    [&+[p[2]: p in Factorization(666*10^(n+1)+100^(n+2)+1)]: n in [0..40]]; // Bruno Berselli, Nov 27 2013
  • Maple
    seq(numtheory:-bigomega(10^(2*n+4)+666*10^(n+1)+1), n=0..30); # Robert Israel, Feb 23 2017
  • Mathematica
    Table[Total[Transpose[FactorInteger[(10^(n + 3) + 666)*10^(n + 1) + 1]][[2]]], {n, 0, 25}] (* T. D. Noe, Nov 28 2013 *)
  • PARI
    a(n)=bigomega(10^(n+1)*(10^(n+3)+666)+1) \\ Charles R Greathouse IV, Nov 26 2013
    

Extensions

a(45)-a(64) from Amiram Eldar, Apr 11 2020

A247552 Least numbers x such that the ratio of the sum of all the cyclic permutations of x, plus the unpermuted number, and x itself is equal to n.

Original entry on oeis.org

1, 11, 111, 1111, 11111, 111111, 428571, 11111111, 111111111, 1111111111, 1818, 111111111111, 230769, 428571428571, 111111111111111, 1111111111111111, 4705882352941176, 111111111111111111, 473684210526315789, 11111111111111111111, 142857, 18181818
Offset: 1

Views

Author

Paolo P. Lava, Sep 19 2014

Keywords

Comments

Mainly repdigit numbers with n 1's.
If x has m digits with sum s then the sum of the m cyclic permutations of x (including x itself) is s*(10^m-1)/9, since each digit occurs once in each position. My program uses this to test potential (m, s) pairs. - Jens Kruse Andersen, Sep 23 2014
If appears that the number of digits of a(n) is n-1 if and only if n is a full reptend prime (A001913). - Michel Marcus, Sep 24 2014
There are 106 repdigit numbers with n 1's in the first 5000 terms. - Jens Kruse Andersen, Sep 30 2014

Examples

			428571 is the minimum number such that 428571 + 142857 + 714285 + 571428 + 857142 + 285714 = 2999997 and 2999997 / 428571 = 7.
1818 is the minimum number such that 1818 + 8181 + 1818 + 8181 = 19998 and 19998 / 1818 = 11.
		

Crossrefs

Programs

  • Maple
    P:=proc(q) local a, b, c, d, j, n, t, v;
    v:=array(1..100); for j from 1 to 100 do v[j]:=0; od; t:=0;
    for n from 1 to q do a:=n; b:=a; c:=ilog10(a);
    for k from 1 to c do a:=(a mod 10)*10^c+trunc(a/10); b:=b+a; od;
    if type(b/n,integer) then if b/n=t+1
    then t:=t+1; lprint(t,n); while v[t+1]>0 do t:=t+1; lprint(t,v[t]); od;
    else if b/n>t+1 then if v[b/n]=0 then v[b/n]:=n; fi; fi;
    fi; fi; od; end: P(10^6);
  • PARI
    isok(n, k) = {d = digits(k); nbd = #d; sp = 0; for (i=1, nbd, dpk = vector(nbd-1, j, d[j+1]); dpk = concat(dpk, d[1]); sp += subst(Pol(dpk, x), x, 10); d = dpk;); sp == k*n;}
    a(n) = {k = 1; while(! isok(n, k), k++;); k ;} \\ Michel Marcus, Sep 21 2014
    
  • PARI
    a(n)=my(r=0,m,g,s,x); for(m=1, n, r=10*r+1; g=n/gcd(r, n); forstep(s=g, 9*m, g, x=s*r/n; if(#digits(x)==m && sumdigits(x)==s, return(x))))
    vector(30, n, a(n)) \\ Faster program. Jens Kruse Andersen, Sep 23 2014

Extensions

a(12)-a(22) from Jens Kruse Andersen, Sep 23 2014

A261773 Number of full reptend primes p < n in base n.

Original entry on oeis.org

0, 1, 0, 2, 0, 2, 2, 1, 1, 2, 2, 3, 1, 2, 0, 5, 2, 4, 3, 2, 3, 4, 4, 1, 2, 3, 5, 5, 2, 4, 5, 6, 3, 3, 0, 6, 4, 5, 6, 6, 4, 5, 5, 4, 4, 6, 7, 1, 5, 4, 8, 7, 5, 6, 7, 7, 6, 6, 5, 10, 6, 9, 0, 8, 4, 10, 6, 8, 4, 9, 9, 11, 7, 6, 7, 7, 8, 11, 8, 1, 7, 7, 8, 9, 8, 9, 8, 12, 7, 9, 10, 8, 5, 8, 9, 10, 11, 9
Offset: 2

Views

Author

Michael De Vlieger, Aug 31 2015

Keywords

Comments

Gives the number of primes p < n, such that the decimal expansion of 1/p has period p-1, which is the greatest period possible for any integer.
Full reptend primes are also called long period primes, long primes, or maximal period primes.
Even square n have a(n) = 0, odd square n have a(n) = 1, since 2 is a full reptend prime for all odd n.
Odd n have a(n) >= 1, since 2 is a full reptend prime in all odd n whose period is 1, i.e., the maximal period (p - 1).
Are 2 and 6 the only numbers other than even squares for which a(n) = 0? Are 3, 10 and 14 the only numbers other than odd squares for which a(n) = 1? - Robert Israel, Aug 31 2015

Examples

			a(10) = 1 since the only full reptend prime in base 10 less than 10 is 7.
a(17) = 5 since the full reptend primes {2, 3, 5, 7, 11} in base 17 are all less than 17.
		

References

  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers. 6th ed., Oxford Univ. Press, 2008, pp. 144-148.

Crossrefs

Cf. A001913.

Programs

  • Maple
    f:= proc(n) nops(select(p -> isprime(p) and numtheory:-order(n,p) = p-1, [$2..n-1])) end proc:
    map(f, [$2..100]); # Robert Israel, Aug 31 2015
  • Mathematica
    Count[Prime@ Range@ PrimePi@ #, n_ /; MultiplicativeOrder[#, n] == n - 1] & /@ Range[2, 99] (* Michael De Vlieger, Aug 31 2015 *)
  • PARI
    a(n) = sum(k=2, n-1, if (isprime(k) && (n%k), znorder(Mod(n, k))==(k-1))); \\ Michel Marcus, Sep 04 2015

A122060 Position in decimal expansion of 1/n where repetition begins.

Original entry on oeis.org

2, 3, 2, 4, 3, 3, 7, 5, 2, 3, 3, 4, 7, 8, 3, 6, 17, 3, 19, 4, 7, 4, 23, 5, 4, 8, 4, 11, 29, 3
Offset: 1

Views

Author

Ben Paul Thurston, Sep 14 2006

Keywords

Comments

If 1/n = 0.XYYYYY... then sequence gives index of first digit of the second Y.
a(4) = 4 and a(p) = p for primes p = {7, 17, 19, 23, 29, 47, 59, 61, 97, ...} = A001913(n) Cyclic numbers: primes with primitive root 10. - Alexander Adamchuk, Jan 28 2007

Examples

			a(4) = 4 because in 0.2500 the zero begins repeating at the fourth position.
a(17) = 17 because 0.05882352941176470588... begins repeating at the 17th position.
		

Crossrefs

Formula

a(n)=A121341(n)+2 if 1/n terminates, else a(n)=A121341(n)+1. - R. J. Mathar, Sep 20 2006

A236184 Decimal expansion of 1/65537.

Original entry on oeis.org

0, 0, 0, 0, 1, 5, 2, 5, 8, 5, 5, 6, 2, 3, 5, 4, 0, 9, 0, 0, 5, 5, 9, 9, 8, 9, 0, 1, 3, 8, 3, 9, 5, 1, 0, 5, 0, 5, 5, 1, 5, 9, 6, 8, 0, 7, 9, 1, 0, 0, 3, 5, 5, 5, 2, 4, 3, 6, 0, 2, 8, 5, 0, 2, 9, 8, 3, 0, 4, 7, 7, 4, 4, 0, 2, 2, 4, 6, 0, 5, 9, 4, 7, 7, 8, 5, 2, 2, 0, 5, 6, 2, 4, 3, 0, 3, 8, 2, 8, 3, 7, 1, 7, 5, 9
Offset: 0

Views

Author

Rick L. Shepherd, Jan 19 2014

Keywords

Comments

Periodic sequence of period 65536. Being a Fermat prime > 5, 65537 is a full reptend prime. One full period is given in the table.

Examples

			0.000015258556235409005599890138395105055159680791003555243602850298304774...
		

Crossrefs

Cf. A007450 (1/17), A021261 (1/257), A019434, A001913, A048963.

Programs

  • Mathematica
    RealDigits[1/65537, 10, 105, -1][[1]] (* T. D. Noe, Jan 27 2014 *)
  • PARI
    {default(realprecision, 66000);
    x = 1/65537; d = 0; for(n = 0, 65535, x = (x-d)*10; d = floor(x);
    write("b236184.txt", n, " ", d))} \\ Rick L. Shepherd, Jan 19 2014 (after similar program by Harry J. Smith)

Formula

a(n + 65536) = a(n).

A244661 Beastly reciprocals, or numbers n such that digitsum(1/n) = 666.

Original entry on oeis.org

149, 298, 596, 646, 745, 1192, 1490, 1615, 2119, 2584, 2980, 3109, 3725, 3878, 5960, 6218, 6357, 6460, 7106, 7294, 7450, 8476, 9262, 9868, 10941, 11627, 11634, 11920, 12436, 14535, 14900, 15049, 15545, 16150, 18625, 21190, 22718, 23256, 23902, 24872, 24915
Offset: 1

Views

Author

Anthony Sand, Jul 04 2014

Keywords

Comments

149 is a full reptend prime (see A001913), hence the sum of the decimal digits of 1/149 is 9 * 148 / 2 = 666.
From Robert G. Wilson v, Aug 16 2014: (Start)
If n is present, so is 10n.
If n is present then A003592*n is possibly present.
Primitives are: 149, 646, 1615, 2119, 3109, 3878, 7294, 9262, 9868, 10941, …, .
Palindromes: 646, 1525251, 2062602, …, .
Primes: 149, 3109, 111149, 351391, …, .
(End)

Examples

			If digitsum(1/n) sums the decimal digits of 1/n up to the point at which they recur or terminate, then digitsum(1/149) = 666 = 0 + 0 + 6 + 7 + 1 + 1 + 4 + 0 + 9 + 3 + 9 + 5 + 9 + 7 + 3 + 1 + 5 + 4 + 3 + 6 + 2 + 4 + 1 + 6 + 1 + 0 + 7 + 3 + 8 + 2 + 5 + 5 + 0 + 3 + 3 + 5 + 5 + 7 + 0 + 4 + 6 + 9 + 7 + 9 + 8 + 6 + 5 + 7 + 7 + 1 + 8 + 1 + 2 + 0 + 8 + 0 + 5 + 3 + 6 + 9 + 1 + 2 + 7 + 5 + 1 + 6 + 7 + 7 + 8 + 5 + 2 + 3 + 4 + 8 + 9 + 9 + 3 + 2 + 8 + 8 + 5 + 9 + 0 + 6 + 0 + 4 + 0 + 2 + 6 + 8 + 4 + 5 + 6 + 3 + 7 + 5 + 8 + 3 + 8 + 9 + 2 + 6 + 1 + 7 + 4 + 4 + 9 + 6 + 6 + 4 + 4 + 2 + 9 + 5 + 3 + 0 + 2 + 0 + 1 + 3 + 4 + 2 + 2 + 8 + 1 + 8 + 7 + 9 + 1 + 9 + 4 + 6 + 3 + 0 + 8 + 7 + 2 + 4 + 8 + 3 + 2 + 2 + 1 + 4 + 7 + 6 + 5 + 1.
		

Crossrefs

Programs

  • Mathematica
    fQ[n_] := Total[ RealDigits[ 1/n, 10][[1, 1]]] == 666;  Select[ Range@ 25000, fQ ] (* Robert G. Wilson v, Aug 16 2014 *)

A306355 Numbers k such that the period of 1/k, or 0 if 1/k terminates, is strictly greater than the period of the decimal expansion of 1/m for all m < k.

Original entry on oeis.org

1, 3, 7, 17, 19, 23, 29, 47, 59, 61, 97, 109, 113, 131, 149, 167, 179, 181, 193, 223, 229, 233, 257, 263, 269, 289, 313, 337, 361, 367, 379, 383, 389, 419, 433, 461, 487, 491, 499, 503, 509, 541, 571, 577, 593, 619, 647, 659, 701, 709, 727, 743, 811, 821, 823
Offset: 1

Views

Author

Matthew Schulz, Feb 09 2019

Keywords

Comments

This sequence is infinite because 1/(10^k-1) has a period of k for all k, so the period can be arbitrarily large.
Are 1, 3, 289 and 361 the only terms that are not in A001913? - Robert Israel, Feb 10 2019

Examples

			7 is a term because 1/7 has a period of 6, which is greater than the periods of 1/m for m < 7.
		

Crossrefs

Contains A001913.

Programs

  • Maple
    count:= 1: A[1]:= 1: m:= 0:
    for k from 0 to 100 do
      for d in [3,7,9,11] do
         x:= 10*k+d;
         p:= numtheory:-order(10,x);
         if p > m then
            m := p;
            count:= count+1;
            A[count]:= x
         fi
    od od:
    seq(A[i],i=1..count); # Robert Israel, Feb 10 2019
  • Mathematica
    ResourceFunction["ProgressiveMaxPositions"]@
     Map[n |->
        First[RealDigits[n]] /. {{_, list_?ListQ} :> Length[list],
          list_?ListQ -> 0}][
      1/Range[1050]] (* Peter Cullen Burbery, Aug 05 2023 *)

Formula

RECORDS transform of A051626.
Previous Showing 41-50 of 62 results. Next