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.

A103828 Sequence of odd numbers defined recursively by: a(1)=1 and a(n) is the first odd number greater than a(n-1) such that a(n) + a(i) + 1 is prime for 1<=i<=n-1.

Original entry on oeis.org

1, 3, 9, 27, 69, 429, 1059, 56499, 166839, 5020059, 7681809, 274343589, 8316187179, 2866819175649, 7180244842749, 216549352241349, 22129340663539629, 2504509324460255499
Offset: 1

Views

Author

Walter Kehowski, May 29 2006

Keywords

Comments

Is the sequence infinite? Is each prime a(i)+a(j)+1, i<>j, always distinct?
Except for a(1), a(n) == 3 (mod 6). - Robert G. Wilson v, Jun 02 2006.
The Hardy-Littlewood k-tuple conjecture would imply that this sequence is infinite. Note that, for n>2, a(n)+2 and a(n)+4 are both primes, so a proof that this sequence is infinite would also show that there are infinitely many twin primes. - N. J. A. Sloane, Apr 21 2007
From the mod 30 property of A115760 we conclude that a(n) == 9 (mod 15) for n>4. This implies that either a(n) == 9 (mod 30) or == 24 (mod 30), but == 24 (mod 30) is impossible because then == 0 (mod 6). Therefore a(n) == 9 (mod 30) for n>4. - Don Reble, Aug 17 2021

Examples

			a(1)=1, a(2)=3, but 5+1+1=7, 5+3+1=9; 7+1+1=9, 7+3+1=11; 9+1+1=11, 9+3+1=13 so a(3)=9.
		

Crossrefs

Cf. A093483, A115760, A115782 (primes arising from this sequence), A118818, A128933 (a(n)+1), A291163.

Programs

  • Maple
    EP:=[]: for w to 1 do for n from 1 to 8*10^6 do s:=2*n-1; Q:=map(z->z+s+1, EP); if andmap(isprime,Q) then EP:=[op(EP),s]; print(nops(EP),s); fi od od; EP;
  • Mathematica
    a[1] = 1; a[2] = 3; a[n_] := a[n] = Block[{k = a[n - 1] + 6, t = Table[ a[i], {i, n - 1}] + 1}, While[ First@ Union@ PrimeQ[k + t] == False, k += 6]; k]; Do[ Print[ a[n]], {n, 15}] (* Robert G. Wilson v, Jun 03 2006 *)

Formula

a(n) = (A115760(n) - 1)/2.

Extensions

a(12) from Robert G. Wilson v, Jun 03 2006
a(13) from Walter Kehowski, Jun 03 2006
Definition corrected by Walter Kehowski, Nov 03 2008
a(14)-a(16) from Don Reble added by N. J. A. Sloane, Sep 18 2012
a(17)-a(18) from Don Reble, Aug 17 2021

A172480 Odd primes p such that there are as many primitive roots (mod p) in the interval [0,p/2] as in the interval [p/2,p].

Original entry on oeis.org

5, 7, 13, 17, 29, 31, 37, 41, 43, 53, 61, 67, 73, 89, 97, 101, 109, 113, 137, 149, 157, 173, 181, 193, 197, 229, 233, 241, 257, 269, 277, 281, 293, 307, 313, 317, 337, 349, 353, 367, 373, 389, 397, 401, 409, 421, 433, 449, 457, 461, 487, 509, 521, 541, 557, 569
Offset: 1

Views

Author

Emmanuel Vantieghem, Feb 04 2010

Keywords

Comments

The sequence contains all the primes of the form 4m+1 (A002144).
The sequence also contains some primes of the form 4m+3 (see them in A172490).

Crossrefs

A002144 is a subsequence.

Programs

  • Maple
    filter:= proc(p) local m; uses NumberTheory;
      if not isprime(p) then return false fi;
      if p mod 4 = 1 then return true fi;
      m:= Totient(Totient(p))/2;
      PrimitiveRoot(p,ith=m+1)=PrimitiveRoot(p,greaterthan=floor(p/2))
    end proc:
    select(filter, [seq(i,i=5..1000,2)]); # Robert Israel, Nov 23 2019
  • Mathematica
    << NumberTheory`NumberTheoryFunctions` m = 2; s = {}; While[m < 10000, m++; p = Prime[m]; If[Mod[p, 4] == 1, s = {s, p}, q = (p - 1)/2; g = PrimitiveRoot[p]; se = Select[Range[p - 1], GCD[ #, p - 1] == 1 &]; e = Length[se]; j = 0; t = 0; While[j < e, j++; h = PowerMod[g, se[[j]], p]; If[h <= q, t = t + 1,] ]; If[e == 2t, s = {s, p},] ] ]; s = Flatten[s]

A128859 Let p be the n-th odd prime; a(n) is the number of primitive roots of p which are <= (p-1)/2.

Original entry on oeis.org

0, 1, 1, 1, 2, 4, 2, 4, 6, 4, 6, 8, 6, 9, 12, 10, 8, 10, 9, 12, 10, 16, 20, 16, 20, 13, 22, 18, 24, 17, 18, 32, 18, 36, 16, 24, 26, 36, 42, 37, 24, 29, 32, 42, 23, 16, 38, 49, 36, 56, 44, 32, 44, 64, 59, 66, 33, 44, 48, 40, 72, 48, 55, 48, 78, 35, 48, 79, 56, 80, 80, 60, 60, 55
Offset: 1

Views

Author

N. J. A. Sloane, Apr 20 2007

Keywords

References

  • Roger Osborn, Tables of All Primitive Roots of Odd Primes Less Than 1000, Univ. Texas Press, Austin, TX, 1961, pp. 69-70.

Crossrefs

Cf. A118818.

Programs

  • Mathematica
    a[n_] := Count[PrimitiveRootList[(p = Prime[n+1])], _?(# <= (p-1)/2 &)]; Array[a, 100]

Extensions

More terms from Don Reble, Apr 20 2007

A172490 Primes p of the form 4m+3 for which there are exactly as many primitive roots modulo p in the interval [0,p/2] as in the interval [p/2,p].

Original entry on oeis.org

7, 31, 43, 67, 307, 367, 487, 643, 1327, 1663, 2371, 3643, 3847, 4327, 4951, 6091, 6571, 8263, 9151, 9187, 11239, 11383, 11863, 15307, 24007, 24151, 27847, 30091, 30643, 33619, 36871, 42187, 44171, 46279, 46591, 48787, 70843, 71887, 72103, 72379, 73363, 79867, 82003, 92503, 95467, 106243, 110431, 120943, 126031, 130363, 139759, 143827, 162751, 167107, 173191, 174859, 183247
Offset: 1

Views

Author

Emmanuel Vantieghem, Feb 05 2010

Keywords

Comments

Primes 4*k+3 where half of the primitive roots are <= (p-1)/2.
The sequence is probably infinite.
Primes of the form 4m+1 always have as many primitive roots in [0,p/2] as in [p/2,p] (see A172480).

Crossrefs

Programs

  • Maple
    with(numtheory): p:=3: while p<1000 do if(p mod 4 = 3)then b1:=0: b2:=0: m:=primroot(p): while not m=FAIL do if(m
  • Mathematica
    << NumberTheory`NumberTheoryFunctions` m = 2; s = {}; While[m < 10000, m++; p = Prime[m]; If[Mod[p, 4] == 1, , q = (p - 1)/2; g = PrimitiveRoot[p]; se = Select[Range[p - 1], GCD[ #, p - 1] == 1 &]; e = Length[se]; j = 0; t = 0; While[j < e, j++; h = PowerMod[g, se[[j]], p]; If[h <= q, t = t + 1,] ]; If[e == 2t, s = {s, p},] ] ]; s = Flatten[s]
  • PARI
    isA172490(p)=isprime(p)&&p%4==3&&sum(n=0,p\2,gcd(n,p)==1&&znorder(Mod(n,p))==p-1)==sum(n=p-p\2,p,gcd(n,p)==1&&znorder(Mod(n,p))==p-1) \\ Charles R Greathouse IV, Jun 27 2011

Extensions

More terms from Robert Israel, Nov 23 2019
Showing 1-4 of 4 results.