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-10 of 18 results. Next

A179383 a(n) = 2*k(n)-1 where k(n) is the sequence of positions of records in A179382.

Original entry on oeis.org

1, 5, 9, 11, 13, 19, 25, 29, 37, 53, 59, 61, 67, 83, 101, 107, 121, 131, 139, 149, 163, 173, 179, 181, 197, 211, 227, 269, 293, 317, 347, 349, 373, 379, 389, 419, 421, 443, 461, 467, 491, 509, 523, 541, 547, 557, 563, 587, 613, 619, 653, 659, 661, 677, 701, 709, 757
Offset: 1

Views

Author

Vladimir Shevelev, Jul 12 2010

Keywords

Comments

Records in A179382(k(n)) = 1, 2, 3, 5, 6, 9, 10, 14, 18, 26, 29, ....
are located at k(n) = 1, 3, 5, 6, 7, 10, 13, 15, 19, 27, 30, 31,..
The current sequence is a simple transformation of this k(n) sequence.
Question: Are there any terms in the sequence with two or more distinct prime divisors?
Some very plausible conjectures: 1) The sequence consists of primes and squares of primes; 2) The set of squares is finite; 3) A prime p>=5 is in the sequence iff it has primitive root 2 (A001122) ; 4) There exists l such that, for n>l, A179383(n) =A139099(n+l) . [From Vladimir Shevelev , Jul 14 2010]

Crossrefs

Extensions

Definition rephrased and sequence extended by R. J. Mathar, Jul 13 2010
I made a change to Conjecture 4). - Vladimir Shevelev, Jul 18 2010

A179686 Let m > k > 0 be odd numbers and operations "m<+>k" and "m<->k" be defined as in A179382 and A179480. Then the sequence m<+>k, m<->(m<+>k), m<+>(m<->(m<+>k)), ... is periodic; a(n) is its smallest period starting from the seeds m=2*n-1 and k=1.

Original entry on oeis.org

1, 2, 4, 2, 2, 2, 4, 2, 6, 4, 4, 6, 8, 6, 4, 2, 4, 10, 4, 6, 2, 4, 12, 12, 4, 14, 12, 2, 14, 14, 4, 2, 18, 12, 16, 4, 8, 16, 16, 14, 18, 4, 12, 4, 4, 4, 20, 10, 6, 22, 24, 4, 26, 6, 16, 6, 20, 4, 12, 26, 8, 22, 4, 2, 34, 8, 20, 14, 34, 24, 32, 6, 20, 42, 4, 12, 8, 10, 24
Offset: 2

Views

Author

Vladimir Shevelev, Jul 24 2010

Keywords

Examples

			If n=4, 2*n-1=7, then we have 7<+>1=1, 7<->1=3, 7<+>3=5, 7<->5=1. Thus a(4)=4.
		

Crossrefs

Programs

  • Maple
    pidx := proc(L,n,m)
        for i from 1 to nops(L)-1 do
            if [op(i..i+1,L)] = [n,m] then
                return i;
            end if;
        end do:
        return -1 ;
    end proc:
    A179686aux := proc(x, y) local xtrack, xitr, p;
        xtrack := [A000265(x+y)] ;
        while true do
            if type(nops(xtrack),'odd') then
                xitr := A000265(x-op(-1, xtrack)) ;
            else
                xitr := A000265(x+op(-1, xtrack)) ;
            end if;
                xtrack := [op(xtrack),xitr] ;
            p := pidx(xtrack,op(-2,xtrack),op(-1,xtrack)) ;
            if p >=1 and p < nops(xtrack) -2 then
                return nops(xtrack)-p-1 ;
            end if;
        end do:
    end proc:
    A179686 := proc(n)
        if n = 2 then
            1;
        else
            A179686aux(2*n-1,1) ;
        end if;
    end proc:
    seq(A179686(n),n=2..80) ; # R. J. Mathar, Dec 04 2011

Extensions

Extended beyond a(24) by R. J. Mathar, Dec 04 2011

A179460 Numbers m for which 2*A179382(m)=A002326(m-1).

Original entry on oeis.org

2, 3, 5, 6, 7, 9, 10, 13, 14, 15, 17, 19, 21, 22, 27, 29, 30, 31, 33, 34, 35, 39, 41, 42, 49, 50, 51, 54, 55, 57, 61, 63, 65, 66, 69, 70, 71, 73, 75, 79, 82, 85, 86, 87, 89, 90, 91, 93, 97, 99, 101, 102, 103, 104, 105, 106, 107, 114, 115, 121, 122, 125, 126, 129, 133, 135
Offset: 1

Views

Author

Vladimir Shevelev, Jul 14 2010

Keywords

Comments

m is in the sequence iff the set {1,2,...,2^(2*m-2)} considered in reduced residue system modulo 2*m-1 contains the same number of odd and even integers.

Examples

			5 in the sequence since modulo 2*5-1=9 we have {1,2,4,8,16,32}={1,2,4,8,7,5} and the last set contains 3 odd and 3 even elements.
		

Crossrefs

Programs

  • Mathematica
    fQ[n_] := Block[{r = Union@ PowerMod[2, Range[0, 2 n - 2], 2 n - 1]}, Length@ r == 2 Count[ OddQ@ r, True]]; Select[ Range@ 138, fQ] (* Robert G. Wilson v, Aug 26 2010 *)

Extensions

More terms from Robert G. Wilson v, Aug 26 2010

A225759 Primes p such that A179382((p+1)/2) = (p-1)/16.

Original entry on oeis.org

1217, 1249, 1553, 4049, 4273, 4481, 4993, 5297, 6449, 6481, 6689, 7121, 8081, 8609, 9137, 9281, 10337, 10369, 10433, 11617, 11633, 12577, 13441, 13633, 14321, 14753, 15569, 16417, 16433, 16673, 17137, 18257, 18433, 18481, 19793, 20113, 20353, 23057, 23857
Offset: 1

Views

Author

Lear Young, May 15 2013

Keywords

Comments

Let n be a natural number coprime to 10 and let c be the "cycle length of n" (defined below).
Conjecture 1: If n-1=2^x*c for some x<5, then n is prime. If x > 4, the relative density of primes in such numbers is 1.
Conjecture 2: If the period of the decimal expansion of 1/n is n-1 or a divisor of n-1, and if n-1=2^x*c or n+1=2^x*c for some x, then n is prime.
- Lear Young, with contributions from Peter Košinár, Giovanni Resta, Charles R Greathouse IV, May 22 2013
To define the "cycle length of n" (using n=73 as an example):
Step 1 : 73 + 1 = 74. Get the odd part of 74, which is 37
Step 2 : 73 + 37 = 110. Get the odd part of 110, which is 55
Step 3 : 73 + 55 = 128. Get the odd part of 128, which is 1
Continuing this operation (with 73+1) repeats the same steps as above. There are 3 steps in the cycle, so the cycle length of 73 is c=3. (same to A179382((73+1)/2)=3).
More for the "cycle length of n" see link and cross references.
The numbers in the sequence are the values of n in the above conjecture when c=4 in case (1).

Examples

			(1217-1)/16 = 76 = A179382(609).
		

Crossrefs

Analogs with different values of c: A001122 when c=1, A155072 when c=2, A001134 when c=3. A225890 has composite values.
Cf. A179382, A136042 (both sequences related to the way to get the "cycle length of n").

Programs

  • PARI
    oddres(n)=n>>valuation(n, 2)
    cyc(d)=my(k=1, t=1); while((t=oddres(t+d))>1, k++); k
    forstep(n=17,1e4,[32,16],if(cyc(n)==n>>4 && isprime(n), print1(n", ")))
    \\ Charles R Greathouse IV, May 15 2013

Extensions

Edited by Charles R Greathouse IV, Nov 11 2014

A225890 Composite numbers n such that A179382((n+1)/2)=(n-1)/(2^c) for some c > 0.

Original entry on oeis.org

92673, 143713, 3579553, 4110529, 28688897, 127017857, 141127681, 157648097, 162101441
Offset: 1

Views

Author

Lear Young and Peter Košinár, May 20 2013

Keywords

Comments

a(10) > 180*10^6. All terms up to a(9) are of the form 32*k+1 and except a(1) are also semiprimes. The numbers 212999489, 393300097 and 663414881 are also terms. - Giovanni Resta, May 21 2013

Examples

			143713=137*1049: A179382((143713+1)/2)=4491=(143713-1)/(2^5)
		

Crossrefs

Cf. A179382.

Programs

  • PARI
    oddres(n)=n>>valuation(n, 2)
    cyc(d)=my(k=1, t=1); while((t=oddres(t+d))>1, k++); k
    p=5;forprime(q=7,1e7,forstep(n=p+2, q-2, 2, my(t=(n-1)/cyc(n), c=valuation(t,2)); if(t>>c==1 && c>0, print1(n", ")));p=q) \\ Charles R Greathouse IV, May 20 2013

Extensions

Missing a(3) from Giovanni Resta, May 20 2013
a(6)-a(9) from Giovanni Resta, May 21 2013

A179541 a(n) is the least possible smallest period attainable by the action of a periodic sequence of binary operations <+>,<-> (see A179382,A179480), beginning with 2n-1<+>1 or 2n-1<->1.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 1, 1, 3, 2, 4
Offset: 2

Views

Author

Vladimir Shevelev, Jul 18 2010

Keywords

Comments

The minorizing sequence for all sequences of type A179382,A179480 with arbitrary periodic rotation of the binary operations <+>,<->.

Examples

			Let n=12, 2n-1=23. Considering periodic sequence <+>,<->,<+>,<->,..., we have 23<+>1=3, 23<->3=5, 23<+>5=7, 23<->7=1, 23<+>1=3,... Thus a(12)<=4. It is not difficult to verify that a(12)>3. Thus a(12)=4.
		

Crossrefs

A225913 Composite numbers coprime to 6 such that A179382(n) = A000265(n-1), the odd part of n-1.

Original entry on oeis.org

517, 1525, 1765, 1837, 2941, 3241, 3265, 3397, 3421, 3565, 4117, 4501, 4669, 6349, 7357, 8569, 8749, 8965, 9085, 9997, 10045, 10057, 10981, 11929, 13741, 14101, 15757, 16117, 18745, 18949, 18997, 19885, 20557, 20629, 21805, 22045, 22645, 24445, 24505, 25417, 25429, 25681, 25885, 25957, 26101, 26245, 27205
Offset: 1

Views

Author

M. F. Hasler, May 20 2013

Keywords

Comments

Inspired by the Conjecture mentioned in A225759.

Programs

  • PARI
    forstep(n=1,9e9,6, A179382(n)==(n-1)>>valuation(n-1,2) & !isprime(n) & print1(n","))

A226014 Primes p such that A179382((p+1)/2) = (p-1)/(2^x) for some x>0.

Original entry on oeis.org

3, 7, 11, 13, 17, 19, 29, 31, 37, 41, 53, 59, 61, 67, 83, 97, 101, 107, 113, 127, 131, 137, 139, 149, 163, 173, 179, 181, 193, 197, 211, 227, 257, 269, 281, 293, 313, 317, 347, 349, 353, 373, 379, 389, 401, 409, 419, 421, 443, 449, 461, 467, 491, 509, 521, 523, 541, 547, 557, 563, 569, 577, 587, 593, 613, 617, 619, 653, 659, 661, 677, 701, 709, 757, 761, 769, 773, 787, 797, 809, 821, 827, 829, 853, 857, 859, 877, 883, 907, 929, 941, 947, 977
Offset: 1

Views

Author

Lear Young, May 22 2013

Keywords

Comments

It is conjectured that:
Let n be an odd number and the period of 1/n is n-1 or a divisor of n-1. Call c=A179382((n+1)/2) the "cycle length of n". If c divides n-1 or n+1 = 2^x for some x>0, then n is prime. For details see link and Cf. - Lear Young, with contributions from Peter Košinár, Giovanni Resta, Charles R Greathouse IV, May 22 2013
The numbers in the sequence are the values of n in the above conjecture.

Examples

			929 : (929-1)/(2^2)=232=A179382((929+1)/2) and znorder(Mod(10,929))=464=(929-1)/2
		

Crossrefs

Cf. A179382, A136042 (both sequences related to the way to get the "cycle length of n").

Programs

  • PARI
    oddres(n)=n>>valuation(n, 2)
    cyc(d)=my(k=1, t=1); while((t=oddres(t+d))>1, k++); k
    forstep(n=3, 1e3, [4, 2, 2, 2], x=cyc(n);z=znorder(Mod(10, n));if((x==1 || (n%x==1 && oddres((n-1)/x)==1)) && (n%z==1 || n%z==0), print1(n", ")))
    \\ Charles R Greathouse IV, May 22 2013

A001122 Primes with primitive root 2.

Original entry on oeis.org

3, 5, 11, 13, 19, 29, 37, 53, 59, 61, 67, 83, 101, 107, 131, 139, 149, 163, 173, 179, 181, 197, 211, 227, 269, 293, 317, 347, 349, 373, 379, 389, 419, 421, 443, 461, 467, 491, 509, 523, 541, 547, 557, 563, 587, 613, 619, 653, 659, 661, 677, 701, 709, 757, 773, 787, 797
Offset: 1

Views

Author

Keywords

Comments

Artin conjectured that this sequence is infinite.
Conjecture: sequence contains infinitely many pairs of twin primes. - Benoit Cloitre, May 08 2003
Pieter Moree writes (Oct 20 2004): Assuming the Generalized Riemann Hypothesis, it can be shown that the density of primes p such that a prescribed integer g has order (p-1)/t, with t fixed, exists and, moreover, it can be computed. This density will be a rational number times the so-called Artin constant. For 2 and 10 the density of primitive roots is A, the Artin constant itself.
It seems that this sequence consists of A050229 \ {1,2}.
Primes p such that 1/p, when written in base 2, has period p-1, which is the greatest period possible for any integer.
Positive integer 2*m-1 is in the sequence iff A179382(m)=m-1. - Vladimir Shevelev, Jul 14 2010
These are the odd primes p for which the polynomial 1+x+x^2+...+x^(p-1) is irreducible over GF(2). - V. Raman, Sep 17 2012 [Corrected by N. J. A. Sloane, Oct 17 2012]
Prime(n) is in the sequence if (and conjecturally only if) A133954(n) = prime(n). - Vladimir Shevelev, Aug 30 2013
Pollack shows that, on the GRH, that there is some C such that a(n+1) - a(n) < C infinitely often (in fact, 1 can be replaced by any positive integer). Further, for any m, a(n), a(n+1), ..., a(n+m) are consecutive primes infinitely often. - Charles R Greathouse IV, Jan 05 2015
From Jianing Song, Apr 27 2019: (Start)
All terms are congruent to 3 or 5 modulo 8. If we define
Pi(N,b) = # {p prime, p <= N, p == b (mod 8)};
Q(N) = # {p prime, p <= N, p in this sequence},
then by Artin's conjecture, Q(N) ~ C*N/log(N) ~ 2*C*(Pi(N,3) + Pi(N,5)), where C = A005596 is Artin's constant.
Conjecture: if we further define
Q(N,b) = # {p prime, p <= N, p == b (mod 8), p in this sequence},
then we have:
Q(N,3) ~ (1/2)*Q(N) ~ C*Pi(N,3);
Q(N,5) ~ (1/2)*Q(N) ~ C*Pi(N,5). (End)
Conjecture: for a prime p > 5, p has primitive root 2 iff p == +-3 (mod 8) divides 2^k + 3 for some k < p - 1 and divides 2^m + 5 for some m < p - 1. It seems that all primes of the form 2^k + 3 for k <> 2 (A057732) have primitive root 2. - Thomas Ordowski, Nov 27 2023

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 864.
  • E. Bach and Jeffrey Shallit, Algorithmic Number Theory, I; see p. 221.
  • J. H. Conway and R. K. Guy, The Book of Numbers, Copernicus Press, New York, 1996; see p. 169.
  • M. Kraitchik, Recherches sur la Théorie des Nombres. Gauthiers-Villars, Paris, Vol. 1, 1924, Vol. 2, 1929, see Vol. 1, p. 56.
  • Lehmer, D. H. and Lehmer, Emma; Heuristics, anyone? in Studies in mathematical analysis and related topics, pp. 202-210, Stanford Univ. Press, Stanford, Calif., 1962.
  • Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See p. 20.
  • D. Shanks, Solved and Unsolved Problems in Number Theory, 2nd. ed., Chelsea, 1978, p. 81.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A002326 for the multiplicative order of 2 mod 2n+1. (Alternatively, the least positive value of m such that 2n+1 divides 2^m-1).
Cf. A216838 (Odd primes for which 2 is not a primitive root).

Programs

  • Mathematica
    Select[ Prime@Range@200, PrimitiveRoot@# == 2 &] (* Robert G. Wilson v, May 11 2001 *)
    pr = 2; Select[Prime[Range[200]], MultiplicativeOrder[pr, # ] == # - 1 &] (* N. J. A. Sloane, Jun 01 2010 *)
  • PARI
    forprime(p=3, 1000, if(znorder(Mod(2, p))==(p-1), print1(p,", "))); \\ [corrected by Michel Marcus, Oct 08 2014]
    
  • Python
    from itertools import islice
    from sympy import nextprime, is_primitive_root
    def A001122_gen(): # generator of terms
        p = 2
        while (p:=nextprime(p)):
            if is_primitive_root(2,p):
                yield p
    A001122_list = list(islice(A001122_gen(),30)) # Chai Wah Wu, Feb 13 2023

Formula

Delta(a(n),2^a(n)*x) = a(n)*Delta(a(n),2*x), where Delta(k,x) is the difference between numbers of evil(A001969) and odious(A000069) integers divisible by k in interval [0,x). - Vladimir Shevelev, Aug 30 2013
For n >= 2, a(n) = 1 + 2*A163782(n-1). - Antti Karttunen, Oct 07 2017

A179480 Let m>k>0 be odd numbers and denote by the symbol "m<->k" the value A000265(m-k). Then the sequence m<->k, m<->(m<->k), m<->(m<->(m<->k)), ... is periodic; a(n) is the smallest period in the case m=2*n-1, k=1.

Original entry on oeis.org

1, 1, 2, 1, 3, 3, 2, 1, 5, 2, 6, 5, 5, 7, 2, 1, 6, 9, 6, 3, 3, 6, 12, 10, 4, 13, 10, 3, 15, 15, 2, 1, 17, 10, 18, 2, 10, 14, 20, 13, 21, 2, 14, 4, 6, 4, 18, 11, 9, 25, 26, 4, 27, 9, 18, 5, 22, 4, 12, 27, 10, 25, 2, 1, 33, 6, 18, 15, 35, 22, 30, 3, 22, 37, 6, 12, 10, 13, 26
Offset: 2

Views

Author

Vladimir Shevelev, Jul 16 2010

Keywords

Comments

A dual sequence to A179382.
Let b = (2*n-1) and k = A003558(n-1). If a(n) is odd, b divides (2^k + 1); but if a(n) is even, b divides (2^k - 1). Examples: a(14) = 5, odd; with b = 27 and A003558(13) = 9. Then 27 divides (2^9 + 1) or 513 = 27 * 19. a(18) = 6, even. b = 35, with k= A003558(17) = 12. Then 35 divides (2^12 - 1). - Gary W. Adamson, Aug 20 2012.
Iff a(n) = n/2 or (n-1)/2, then 2*n - 1 is a prime with one coach and is in A216371. Examples: a(19) = 9, so 37 is in A216371. a(12) = 6, so 23 is in A216371. - _Gary W. Adamson, Sep 08 2012.

Examples

			If n=14, then m=27 and we have 27<->1=13, 27<->13=7, 27<->7=5, 27<->5=11, 27<->11=1. Thus a(14)=5.
		

Crossrefs

Programs

  • Maple
    Contribution from R. J. Mathar, Nov 04 2010: (Start)
    A179480aux := proc(x,y) local xtrack,xitr,xpos ; xtrack := [y] ; while true do xitr := A000265(x-op(-1,xtrack)) ; if not member(xitr, xtrack,'xpos') then xtrack := [op(xtrack),xitr] ; else return 1+nops(xtrack)-xpos ; end if; end do: end proc:
    A179480 := proc(n) A179480aux(2*n-1,1) ; end proc: seq(A179480(n),n=2..80) ; (End)
  • Mathematica
    oddres[n_] := n/2^IntegerExponent[n, 2];
    b[x_, y_] := Module[{xtrack = {y}, xitr}, While[True, xitr = oddres[x - Last@ xtrack]; If[FreeQ[xtrack, xitr], AppendTo[xtrack, xitr], Return[ Length[xtrack]]]]];
    a[n_] := b[2n-1, 1];
    a /@ Range[2, 80] (* Jean-François Alcover, Apr 13 2020, after R. J. Mathar *)

Extensions

Edited by N. J. A. Sloane, Jul 18 2010
More terms from R. J. Mathar, Nov 04 2010
Showing 1-10 of 18 results. Next