login
This site is supported by donations to The OEIS Foundation.

 

Logo

The OEIS Foundation is grateful to everyone who made a donation during our Annual Appeal.     Visit the new and spectacular Pictures from the OEIS page!

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A047980 a(n) is smallest difference d of an arithmetic progression dk+1 whose first prime occurs at the n-th position. 3
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 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

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

LINKS

Robert Israel, Table of n, a(n) for n = 1..72

Index entries for sequences related to primes in arithmetic progressions

FORMULA

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

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

PROG

(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

CROSSREFS

Cf. A034693, A034694, A034780, A034782 - A034784, A006093, A047981, A047982.

Sequence in context: A204578 A120085 A062834 * A084702 A168061 A261381

Adjacent sequences:  A047977 A047978 A047979 * A047981 A047982 A047983

KEYWORD

nonn

AUTHOR

Labos Elemer

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified February 9 21:06 EST 2016. Contains 268138 sequences.