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 31-40 of 60 results. Next

A034780 Numbers k such that A034693(k) = 4.

Original entry on oeis.org

7, 13, 25, 27, 37, 43, 45, 49, 57, 67, 73, 79, 84, 87, 93, 97, 115, 127, 139, 142, 160, 163, 169, 175, 177, 193, 199, 205, 207, 213, 234, 235, 253, 255, 258, 265, 267, 277, 279, 295, 298
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Position[#, 4] &@ Table[k = 1; While[! PrimeQ[k n + 1], k++]; k, {n, 300}] // Flatten (* Michael De Vlieger, Mar 02 2017 *)

A034783 Numbers k such that A034693(k) = 6.

Original entry on oeis.org

17, 47, 55, 61, 77, 91, 101, 103, 107, 118, 121, 123, 137, 143, 147, 151, 161, 170, 181, 187, 195, 208, 217, 237, 241, 247, 248, 257, 263, 266, 271, 283, 287, 291, 297, 305, 311, 313, 331, 333, 335, 342, 347, 355, 367, 381, 385, 391, 395, 397, 406
Offset: 1

Views

Author

Keywords

Crossrefs

A034849 a(n) = 1 + 2*A034784(n).

Original entry on oeis.org

7, 11, 17, 19, 23, 29, 31, 41, 43, 47, 53, 59, 67, 71, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 163, 167, 173, 179, 181, 191, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 281, 283, 293, 307, 311, 317, 331
Offset: 1

Views

Author

Keywords

Comments

The terms are odd prime numbers.

Crossrefs

Programs

  • Mathematica
    1 + 2 Position[#, 2] &@ Table[k = 1; While[! PrimeQ[k n + 1], k++]; k, {n, 165}] // Flatten (* Michael De Vlieger, Jul 31 2017 *)
  • PARI
    lista(nn) = for (n=1, nn, if (isprime(p=2*n+1) && !isprime(n+1), print1(p, ", "));); \\ Michel Marcus, Aug 01 2017

Extensions

Edited by N. J. A. Sloane, Oct 27 2012

A072063 Smallest prime of form prime(n)+k*n, k>0.

Original entry on oeis.org

3, 5, 11, 11, 31, 19, 31, 43, 41, 59, 53, 61, 67, 71, 107, 101, 127, 79, 181, 131, 157, 101, 313, 113, 197, 127, 157, 163, 167, 173, 251, 163, 269, 173, 359, 223, 379, 239, 401, 293, 1163, 223, 277, 281, 467, 337, 587, 271, 521, 379, 641, 499
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 12 2002

Keywords

Comments

According to Dirichlet's theorem primes of form prime(n)+k*n exist for all n, as gcd(n, prime(n))=1.
Nontrivial least prime == prime(n) (mod n).

Examples

			n=3, prime(3)=5: 5+1*3=8 is not prime, but 5+2*3=11, therefore a(3)=11 and A072064(3)=2.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local p,k,k0;
      p:= ithprime(n);
      if n::odd then k0:= 2 else k0:= 1 fi;
      for k from k0 by k0 do
        if isprime(p+k*n) then return p+k*n fi
      od:
    end proc:
    f(1):= 3:
    map(f, [$1..100]); # Robert Israel, Nov 27 2023
  • Mathematica
    sp[n_]:=Module[{p=Prime[n],k=1},While[!PrimeQ[p+k*n],k++];p+k*n]; Array[ sp,60] (* Harvey P. Dale, Apr 19 2019 *)
  • PARI
    a072063(n) = {my (p=prime(n), j); for (k=1, oo, if(isprime(j=p+k*n), return(j)))}; \\ Hugo Pfoertner, Nov 27 2023

A047980 a(n) is smallest difference d of an arithmetic progression dk+1 whose first prime occurs at the n-th position.

Original entry on oeis.org

1, 3, 24, 7, 38, 17, 184, 71, 368, 19, 668, 59, 634, 167, 512, 757, 1028, 197, 1468, 159, 3382, 799, 4106, 227, 10012, 317, 7628, 415, 11282, 361, 38032, 521, 53630, 3289, 37274, 2633, 63334, 1637, 34108, 1861, 102296, 1691, 119074, 1997, 109474, 2053
Offset: 1

Views

Author

Keywords

Comments

Definition involves two minimal conditions: (1) the first prime (as in A034693) and (2) dk+1 sequences were searched with minimal d. Present terms are the first ones in sequences analogous to A034780, A034782-A034784, A006093 (called there K(n,m)).
Index of the first occurrence of n in A034693. - Amarnath Murthy, May 08 2003

Examples

			For n=2, the sequence with d=1 is 2,3,4,5,... with the prime 2 for k=1.  The sequence with d=2 is 3,5,7,9,... with the prime 3 for k=1.  The sequence with d=3 is 4,7,10,13,... with the prime 7 for k=2.  So a(n)=3. - _Michael B. Porter_, Mar 18 2019
		

Crossrefs

Programs

  • MATLAB
    function [ A ] = A047980( P, N )
    %   Get values a(i) for i <= N with a(i) <= P/i
    %   using primes <= P.
    %   Returned entries A(n) = 0 correspond to unknown a(n) > P/n
    Primes = primes(P);
    A = zeros(1,N);
    Ds = zeros(1,P);
    for p = Primes
       ns = [1:N];
       ns = ns(mod((p-1) * ones(1,N), ns) == 0);
       newds = (p-1) ./ns;
       ns = ns(A(ns) == 0);
       ds = (p-1) ./ ns;
       q = (Ds(ds) == 0);
       A(ns(q)) = ds(q);
       Ds(newds) = 1;
    end
    end % Robert Israel, Jan 25 2016
  • Maple
    N:= 40: # to get a(n) for n <= N
    count:= 0:
    p:= 0:
    Ds:= {1}:
    while count < N do
        p:= nextprime(p);
        ds:= select(d -> (p-1)/d <= N, numtheory:-divisors(p-1) minus Ds);
        for d in ds do
          n:= (p-1)/d;
          if not assigned(A[n]) then
            A[n]:= d;
            count:= count+1;
          fi
        od:
        Ds:= Ds union ds;
    od:
    seq(A[i],i=1..N); # Robert Israel, Jan 25 2016
  • Mathematica
    With[{s = Table[k = 1; While[! PrimeQ[k n + 1], k++]; k, {n, 10^6}]}, TakeWhile[#, # > 0 &] &@ Flatten@ Array[FirstPosition[s, #] /. k_ /; MissingQ@ k -> {0} &, Max@ s]] (* Michael De Vlieger, Aug 01 2017 *)

Formula

a(n) = min{k | A034693(k) = n}.

A060940 Triangle in which n-th row gives the phi(n) terms appearing as initial primes in arithmetic progressions with difference n, with initial term equal to the smallest positive residue coprimes to n.

Original entry on oeis.org

2, 3, 7, 5, 5, 7, 11, 7, 13, 19, 7, 11, 29, 23, 17, 11, 19, 13, 17, 11, 13, 23, 19, 11, 13, 23, 43, 17, 11, 13, 17, 19, 23, 13, 47, 37, 71, 17, 29, 19, 31, 43, 13, 17, 19, 23, 53, 41, 29, 17, 31, 19, 59, 47, 61, 23, 37, 103, 29, 17, 19, 23, 53, 41, 31, 17, 19, 37, 23, 41, 43, 29
Offset: 1

Views

Author

Labos Elemer, May 07 2001

Keywords

Examples

			For differences 1, 2, 3, 4, 5, 6, 7, .. the initial primes are 2; 3; 7, 5; 5, 7; 11, 7, 13, 19; 7, 11; 29, 23, 17, 11, 19, 13; ... etc. Suitable initial values (coprimes to difference) are in A038566. Position of end(start) of rows is given by values of A002088.
From _Seiichi Manyama_, Apr 02 2018: (Start)
   n | phi(n)|
  ---+-------+------------------------
   1 |   1   |  2;
   2 |   1   |  3;
   3 |   2   |  7,  5;
   4 |   2   |  5,  7;
   5 |   4   | 11,  7, 13, 19;
   6 |   2   |  7, 11;
   7 |   6   | 29, 23, 17, 11, 19, 13;
   8 |   4   | 17, 11, 13, 23;
   9 |   6   | 19, 11, 13, 23, 43, 17;
  10 |   4   | 11, 13, 17, 19;         (End)
		

Crossrefs

A061599 Primes p such that the greatest prime divisor of p-1 is 5.

Original entry on oeis.org

11, 31, 41, 61, 101, 151, 181, 241, 251, 271, 401, 541, 601, 641, 751, 811, 1201, 1601, 1621, 1801, 2161, 2251, 3001, 4001, 4051, 4801, 4861, 6481, 7681, 8101, 8641, 9001, 9601, 9721, 11251, 14401, 15361, 16001, 19441, 21601, 21871, 22501, 23041, 24001
Offset: 1

Views

Author

Labos Elemer, Jun 13 2001

Keywords

Comments

Prime numbers n for which cos(2Pi/n) is an algebraic number of 5th degree. - Artur Jasinski, Dec 13 2006
The least significant digit of each term is one. - Harvey P. Dale, Jul 07 2024

Crossrefs

The 3rd in a family of sequences after A019434(=Fermat-primes) and A058383.

Programs

  • Mathematica
    Do[If[Take[FactorInteger[EulerPhi[2n + 1]][[ -1]],1] == {5} && PrimeQ[2n + 1], Print[2n + 1]], {n, 1, 10000}] (* Artur Jasinski, Dec 13 2006 *)
    Select[Prime[Range[3000]],Max[FactorInteger[#-1][[;;,1]]]==5&] (* Harvey P. Dale, Jul 07 2024 *)
  • PARI
    { default(primelimit, 167772161); n=0; forprime (p=3, 167772161, f=factor(p - 1)~; if (f[1, length(f)]==5, write("b061599.txt", n++, " ", p)) ) } \\ Harry J. Smith, Jul 25 2009
    
  • PARI
    list(lim)=my(v=List(), s, t); lim\=1; lim--; for(i=1, logint(lim\2, 5), t=2*5^i; for(j=0, logint(lim\t, 3), s=t*3^j; while(s<=lim, if(isprime(s+1), listput(v, s+1)); s<<=1))); Set(v) \\ Charles R Greathouse IV, Oct 29 2018

Formula

Primes of the form 2^a*3^b*5^c + 1 with a and c > 0.

A077319 Average of terms in n-th row of A077316.

Original entry on oeis.org

2, 4, 13, 16, 43, 25, 113, 95, 131, 97, 329, 139, 479, 240, 373, 384, 813, 302, 1315, 514, 815, 675, 1555, 775, 1697, 1015, 1607, 1235, 3189, 806, 3739, 1795, 2407, 1800, 3303, 1537, 5349, 2790, 3787, 2652, 6705, 1869, 7255, 3645, 4663, 3504, 8411, 3097
Offset: 1

Views

Author

Amarnath Murthy, Nov 04 2002

Keywords

Crossrefs

Formula

a(n) = A077318(n)/n.

Extensions

Edited, corrected and extended by Franklin T. Adams-Watters, Aug 29 2006

A279756 Smallest prime p >= prime(n) such that p == 2 (mod prime(n)).

Original entry on oeis.org

2, 5, 7, 23, 13, 41, 19, 59, 71, 31, 157, 113, 43, 131, 331, 373, 61, 307, 337, 73, 367, 239, 251, 269, 293, 103, 311, 109, 547, 1019, 383, 919, 139, 419, 151, 757, 787, 491, 503, 521, 181, 907, 193, 967, 199, 599, 1901, 1117, 229, 2063, 701, 241, 3617, 1759, 773
Offset: 1

Views

Author

Thomas Ordowski and Altug Alkan, Dec 18 2016

Keywords

Comments

Conjecture: a(n) < prime(n)^2 for every n.
If this conjecture is true, then no terms are repeated.

Crossrefs

A006512 is a subsequence.

Programs

  • Maple
    a:= proc(n) local q, p; p:= ithprime(n); q:= p;
          do if irem(q-2, p)=0 then break fi;
             q:= nextprime(q);
          od; q
        end:
    seq(a(n), n=1..55);  # Alois P. Heinz, May 03 2021
  • Mathematica
    a[n_] := Module[{p = Prime[n], q}, q = p; While[True, If[Mod[q-2, p] == 0, Break[], q = NextPrime[q]]]; q];
    Table[a[n], {n, 1, 55}] (* Jean-François Alcover, Jun 13 2025, after Alois P. Heinz *)
  • PARI
    a(n) = {p = prime(n); q = p; while (Mod(q, p) != 2, q = nextprime(q+1)); q;} \\ Michel Marcus, Dec 18 2016
    
  • Python
    from itertools import dropwhile, count
    from sympy import isprime, prime
    def A279756(n): return next(dropwhile(lambda x:not isprime(x),count(2 if (p:=prime(n))==2 else p+2,p))) # Chai Wah Wu, Jan 04 2024

A035091 Smallest prime == 1 mod (n^2).

Original entry on oeis.org

2, 5, 19, 17, 101, 37, 197, 193, 163, 101, 727, 433, 677, 197, 1801, 257, 3469, 1297, 10831, 401, 883, 1453, 12697, 577, 11251, 677, 1459, 3137, 10093, 1801, 15377, 12289, 2179, 3469, 7351, 1297, 5477, 18773, 9127, 1601, 16811, 3529, 22189, 11617
Offset: 1

Views

Author

Keywords

Comments

Smallest prime of form (n^2)*k+1, i.e., an arithmetic progression with n^2 differences; k is the subscript of the progressions.

Examples

			a(5) = 101 because in 5^2k + 1 = 25k + 1 progression k=4 generates the smallest prime (this is 101) and 26, 51, and 76 are composite.
		

Crossrefs

Analogous case is A034694. Special case is A002496.

Programs

  • Mathematica
    With[{prs=Prime[Range[2500]]},Flatten[Table[Select[prs,Mod[#-1,n^2]==0&,1],{n,50}]]] (* Harvey P. Dale, Sep 22 2021 *)
  • PARI
    a(n) = if(n == 1, 2, my(s = n^2); forprime(p = 1, , if(p % s == 1, return(p)))); \\ Amiram Eldar, Mar 16 2025
Previous Showing 31-40 of 60 results. Next