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-3 of 3 results.

A038031 Position reached by frog in A038029. A038026(A038029(n)).

Original entry on oeis.org

2, 19, 19, 43, 103, 43, 137, 149, 103, 83, 71, 233, 137, 149, 373, 389, 479, 1021, 233, 647, 691, 487, 197, 419, 2459, 619, 389, 1543, 1021, 647, 691, 4349, 1019, 419, 4817, 6581, 3067, 2939, 6983, 2389, 8783, 1489, 2549, 2459, 2887, 11621
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A038025.

A038025 Winner of n-th Littlewood Frog Race.

Original entry on oeis.org

1, 1, 1, 1, 4, 1, 1, 1, 1, 9, 10, 1, 12, 1, 1, 9, 1, 1, 1, 1, 4, 21, 22, 1, 24, 25, 1, 27, 27, 1, 1, 1, 16, 1, 16, 35, 32, 1, 38, 9, 10, 25, 33, 25, 1, 45, 27, 1, 25, 49, 44, 25, 24, 1, 1, 9, 34, 27, 1, 49, 24, 1, 58, 57, 64, 49, 8, 49, 65, 51, 48, 49, 72, 69, 68
Offset: 1

Views

Author

Keywords

Comments

For 0 < k <= n, gcd(n,k) = 1, let P(n,k) be the smallest prime of the form a*n+k, with a >= 0. "Frog" k0 is said to win "race" n if P(n,k0) is largest of the phi(n) values P(n,k).
In case of draws of P(n,k) values take the largest k. - R. J. Mathar, Jul 26 2015

Crossrefs

Cf. A038026, A038029 (records).

Programs

  • Maple
    A038025P := proc(n,k)
        local a;
        for a from 0 do
            if isprime(a*n+k) then
                return a;
            end if;
        end do:
    end proc:
    A038025 := proc(n)
        local a,phimax,phi,k ;
        a :=0 ;
        phimax := 0 ;
        for k from 1 to n do
            if igcd(k,n) = 1 then
                phi := A038025P(n,k) ;
                if phi >= phimax then
                    a := k;
                    phimax := phi;
                end if;
            end if;
        od;
        a ;
    end proc:
    seq(A038025(n),n=1..100) ; # R. J. Mathar, Jul 26 2015
  • Mathematica
    A038025P[n_, k_] := Module[{a}, For[a = 0, True, a++, If[PrimeQ[a n + k], Return[a]]]];
    A038025[n_] := Module[{a = 0, phiMax = 0, phi, k}, For[k = 1, k <= n, k++, If [GCD[k, n] == 1, phi = A038025P[n, k]; If[phi >= phiMax, a = k; phiMax = phi]]]; a];
    Array[A038025, 100] (* Jean-François Alcover, Apr 16 2020, after R. J. Mathar *)

A038030 Indices of incrementally largest values of A038025.

Original entry on oeis.org

1, 5, 10, 11, 13, 22, 23, 25, 26, 28, 36, 39, 46, 50, 63, 65, 69, 73, 78, 81, 87, 100, 102, 105, 107, 124, 130, 141, 146, 162, 174, 199, 204, 210, 219, 227, 236, 245, 259, 266, 293, 300, 320, 354, 364, 389, 390, 398, 405, 417, 423, 438, 459, 465
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A038029.
Showing 1-3 of 3 results.