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 21-30 of 31 results. Next

A064421 Term at which n appears in A064413 (if it begins at 2).

Original entry on oeis.org

0, 1, 4, 2, 9, 3, 13, 7, 5, 8, 19, 6, 27, 12, 10, 16, 32, 11, 36, 17, 14, 18, 42, 15, 23, 26, 21, 25, 56, 22, 60, 30, 20, 31, 24, 29, 66, 35, 28, 39, 73, 34, 80, 40, 38, 41, 88, 44, 49, 45, 33, 46, 99, 47, 52, 48, 37, 55, 106, 51, 114, 59, 50, 63, 53, 58, 127, 64, 43, 54, 133
Offset: 1

Views

Author

Jonathan Ayres (Jonathan.ayres(AT)btinternet.com), Sep 30 2001

Keywords

Comments

Every nonnegative number appears here exactly once.

Crossrefs

Cf. A064413. Equals A064664 - 1.

Programs

  • Mathematica
    terms = 100;
    ekg[s_] := Block[{m = s[[-1]], k = 3}, While[MemberQ[s, k] || GCD[m, k] == 1, k++]; Append[s, k]];
    EKG = Nest[ekg, {2, 4}, 2 terms];
    a[1] = 0; a[n_] := FirstPosition[EKG, n] // First;
    Array[a, terms] (* Jean-François Alcover, Aug 30 2018, after Robert G. Wilson v *)

Extensions

More terms from Naohiro Nomoto, Sep 30 2001

A240024 Nonprime EKG sequence, cf. A064413: a(1) = 1, a(2) = 4 and for n > 2, a(n) = smallest composite number not already used which shares a factor with a(n-1).

Original entry on oeis.org

1, 4, 6, 8, 10, 12, 9, 15, 18, 14, 16, 20, 22, 24, 21, 27, 30, 25, 35, 28, 26, 32, 34, 36, 33, 39, 42, 38, 40, 44, 46, 48, 45, 50, 52, 54, 51, 57, 60, 55, 65, 70, 49, 56, 58, 62, 64, 66, 63, 69, 72, 68, 74, 76, 78, 75, 80, 82, 84, 77, 88, 86, 90, 81, 87, 93
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 30 2014

Keywords

Comments

A239965 gives the position of the n-th nonprime; a(A239965(n))=A018252(n).

Crossrefs

Cf. A064413, A064664 (EKG sequence).

Programs

  • Haskell
    import Data.List (delete, genericIndex)
    a240024 n = genericIndex a240024_list (n - 1)
    a240024_list = 1 : ekg 4 a002808_list where
       ekg x zs = f zs where
           f (y:ys) = if gcd x y > 1 then y : ekg y (delete y zs) else f ys
  • Mathematica
    a = {1, 4}; Do[k = 6; While[Or[PrimeQ@ k, MemberQ[a, k], CoprimeQ[a[[i - 1]], k]], k++]; AppendTo[a, k], {i, 3, 66}]; a (* Michael De Vlieger, Sep 01 2016 *)

A349613 Dirichlet convolution of A064413 (EKG-permutation) with the Dirichlet inverse of its inverse permutation.

Original entry on oeis.org

1, 0, -1, 3, -7, 7, -2, -6, 9, 10, -5, -15, -14, -2, 55, 10, -17, -41, -15, -36, 42, 18, -13, 44, 81, 29, -35, -45, -18, -180, -29, -23, 41, 53, 135, 99, -48, 51, 114, 131, -30, -140, -58, -53, -303, 34, -37, -120, 34, -196, 147, -87, -45, 226, 207, 166, 103, 67, -41, 466, -84, 91, -288, 13, 350, -258, -91, -108
Offset: 1

Views

Author

Antti Karttunen, Nov 23 2021

Keywords

Comments

Obviously, convolving this with A064664 gives A064413 back.

Crossrefs

Cf. A064413, A064664, A323411, A349614 (Dirichlet inverse), A349615 (sum with it), A349616.
Cf. also pairs A349376, A349377 and A349397, A349398 for similar constructions.

Programs

  • PARI
    up_to = 32768;
    v064413 = readvec("b064413_upto65539_terms_only.txt"); \\ Data prepared with Chai Wah Wu's Dec 08 2014 Python-program given in A064413.
    A064413(n) = v064413[n];
    \\ Then its inverse A064664 is prepared:
    m064664 = Map();
    for(n=1,65539,mapput(m064664,A064413(n),n));
    A064664(n) = mapget(m064664,n);
    DirInverseCorrect(v) = { my(u=vector(#v)); u[1] = (1/v[1]); for(n=2, #v, u[n] = (-u[1]*sumdiv(n, d, if(dA064664(n)));
    A323411(n) = v323411[n];
    A349613(n) = sumdiv(n,d,A064413(d)*A323411(n/d));

Formula

a(n) = Sum_{d|n} A064413(d) * A323411(n/d).

A255479 Inverse permutation to A255582.

Original entry on oeis.org

1, 2, 3, 4, 10, 5, 13, 6, 7, 8, 21, 9, 24, 11, 12, 16, 31, 14, 38, 18, 15, 23, 43, 20, 30, 22, 17, 25, 51, 28, 59, 27, 19, 29, 32, 37, 67, 36, 26, 34, 78, 35, 81, 39, 42, 41, 90, 44, 52, 46, 33, 48, 101, 47, 58, 50, 40, 49, 108, 55, 119, 57, 54, 64, 60, 63, 131, 66, 45, 62, 136, 68
Offset: 1

Views

Author

N. J. A. Sloane, Feb 27 2015

Keywords

Comments

The differences |a(n)-A064664(n)| seem surprisingly small (see A255482).
About the definition: the map n -> A255582(n) is an element of the group of all permutations of the positive integers; this is the inverse of that permutation.

Crossrefs

Programs

  • Haskell
    import Data.List (elemIndex); import Data.Maybe (fromJust)
    a255479 = (+ 1) . fromJust. (`elemIndex` a255582_list)
    -- Reinhard Zumkeller, Mar 10 2015

A339731 Let G be the undirected graph with nodes {g_k, k > 0} such that for any k > 0, g_k is connected to g_{k+1} and g_{A064413(k)} is connected to g_{A064413(k+1)}; a(n) is the distance between g_1 and g_n.

Original entry on oeis.org

0, 1, 2, 2, 3, 3, 4, 4, 3, 4, 5, 4, 5, 5, 4, 5, 6, 5, 6, 6, 5, 6, 7, 6, 7, 6, 7, 7, 8, 8, 8, 7, 6, 7, 8, 7, 8, 7, 6, 7, 8, 8, 9, 8, 8, 8, 9, 9, 9, 8, 7, 8, 9, 9, 9, 8, 7, 8, 9, 10, 10, 9, 10, 10, 10, 10, 10, 9, 8, 9, 10, 10, 10, 9, 10, 11, 11, 11, 11, 10, 10
Offset: 1

Views

Author

Rémy Sigrist, Dec 14 2020

Keywords

Crossrefs

See A339695 for a similar sequence.

Programs

  • PARI
    See Links section.

Formula

abs(a(n) - a(k)) <= abs(n-k) for any n, k > 0.
a(n) = A339733(n, 1).

A339732 Let G be the undirected graph with nodes {g_k, k > 0} such that for any k > 0, g_k is connected to g_{k+1} and g_{A064413(k)} is connected to g_{A064413(k+1)}; a(n) is the number of nodes at distance n from g_1.

Original entry on oeis.org

1, 1, 2, 3, 5, 6, 8, 11, 15, 17, 28, 39, 48, 64, 94, 116, 164, 217, 289, 395, 542, 729, 919, 1154, 1598, 2091, 2747, 3702, 4867, 6338, 8290, 10873, 14533, 18919, 24577, 31918, 41857
Offset: 0

Views

Author

Rémy Sigrist, Dec 14 2020

Keywords

Crossrefs

Programs

  • PARI
    See Links section.

A339733 Square array T(n, k) read by antidiagonals, n > 0 and k > 0; let G be the undirected graph with nodes {g_k, k > 0} such that for any k > 0, g_k is connected to g_{k+1} and g_{A064413(k)} is connected to g_{A064413(k+1)}; T(n, k) is the distance between g_n and g_k.

Original entry on oeis.org

0, 1, 1, 2, 0, 2, 2, 1, 1, 2, 3, 1, 0, 1, 3, 3, 2, 1, 1, 2, 3, 4, 2, 2, 0, 2, 2, 4, 4, 3, 1, 1, 1, 1, 3, 4, 3, 3, 2, 1, 0, 1, 2, 3, 3, 4, 2, 2, 2, 1, 1, 2, 2, 2, 4, 5, 3, 1, 3, 2, 0, 2, 3, 1, 3, 5, 4, 4, 2, 2, 2, 1, 1, 2, 2, 2, 4, 4, 5, 3, 3, 2, 2, 2, 0, 2, 2, 2, 3, 3, 5, 5, 4, 2, 3, 1, 2, 1, 1, 2, 1, 3, 2, 4, 5
Offset: 1

Views

Author

Rémy Sigrist, Dec 14 2020

Keywords

Examples

			Array T(n, k) begins:
  n\k|  1  2  3  4  5  6  7  8  9  10  11  12
  ---+---------------------------------------
    1|  0  1  2  2  3  3  4  4  3   4   5   4
    2|  1  0  1  1  2  2  3  3  2   3   4   3
    3|  2  1  0  1  2  1  2  2  1   2   3   2
    4|  2  1  1  0  1  1  2  3  2   2   3   3
    5|  3  2  2  1  0  1  2  2  2   1   2   3
    6|  3  2  1  1  1  0  1  2  2   2   3   3
    7|  4  3  2  2  2  1  0  1  2   2   3   2
    8|  4  3  2  3  2  2  1  0  1   1   2   1
    9|  3  2  1  2  2  2  2  1  0   1   2   1
   10|  4  3  2  2  1  2  2  1  1   0   1   2
   11|  5  4  3  3  2  3  3  2  2   1   0   1
   12|  4  3  2  3  3  3  2  1  1   2   1   0
		

Crossrefs

Programs

  • PARI
    See Links section.

Formula

T(n, n) = 0.
T(n, k) = T(k, n).
T(n, k) <= abs(n-k).
T(m, k) <= T(m, n) + T(n, k).
T(n, 1) = A339731(n).

A349616 Dirichlet convolution of A000027 (the identity function) with the Dirichlet inverse of the inverse permutation of EKG-permutation.

Original entry on oeis.org

1, 0, -2, 1, -5, 6, -7, -2, 13, 11, -9, -6, -15, 15, 49, 0, -16, -42, -18, -15, 69, 21, -20, 24, 51, 29, -48, -21, -28, -168, -30, -1, 97, 34, 150, 65, -30, 38, 141, 48, -33, -236, -38, -32, -317, 44, -42, -40, 97, -163, 163, -36, -47, 248, 192, 75, 183, 58, -48, 294, -54, 62, -443, 1, 301, -338, -61, -50, 211
Offset: 1

Views

Author

Antti Karttunen, Nov 23 2021

Keywords

Crossrefs

Cf. A000027, A064413, A064664, A323411, A349617 (Dirichlet inverse).
Cf. also A349613, A349614.

Programs

  • PARI
    up_to = 32768;
    v064413 = readvec("b064413_upto65539_terms_only.txt"); \\ Data prepared with Chai Wah Wu's Dec 08 2014 Python-program given in A064413.
    A064413(n) = v064413[n];
    \\ Then its inverse A064664 was prepared:
    m064664 = Map();
    for(n=1,65539,mapput(m064664,A064413(n),n));
    A064664(n) = mapget(m064664,n);
    DirInverseCorrect(v) = { my(u=vector(#v)); u[1] = (1/v[1]); for(n=2, #v, u[n] = (-u[1]*sumdiv(n, d, if(dA064664(n)));
    A323411(n) = v323411[n];
    A349616(n) = sumdiv(n,d,d*A323411(n/d));

Formula

a(n) = Sum_{d|n} d * A323411(n/d).

A379293 Index where n appears as a term in A379248.

Original entry on oeis.org

1, 2, 9, 3, 13, 4, 42, 5, 8, 6, 88, 7, 94, 16, 11, 15, 233, 10, 241, 17, 24, 18, 412, 19, 12, 20, 23, 21, 651, 22, 659, 26, 33, 27, 44, 25, 669, 29, 35, 28, 1169, 31, 1175, 30, 32, 38, 1187, 37, 41, 14, 56, 39, 2009, 34, 46, 40, 58, 48, 2015, 49, 2021, 50, 36, 51, 96, 52, 2145, 53, 60, 54, 2151, 55, 2157, 64, 45, 63, 90, 62, 2163, 65, 57, 66, 2169, 67, 98
Offset: 1

Views

Author

Scott R. Shannon, Dec 20 2024

Keywords

Comments

See A379248 for further details.

Crossrefs

A347348 a(n) is the rank of A008619(n) in A164912.

Original entry on oeis.org

1, 2, 3, 5, 4, 10, 8, 14, 6, 9, 7, 20, 13, 28, 11, 17, 12, 33, 18, 37, 15, 19, 16, 43, 24, 27, 22, 26, 23, 57, 31, 61, 21, 32, 25, 30, 36, 67, 29, 40, 35, 74, 41, 81, 39, 42, 45, 89, 46, 50, 34, 47, 48, 100, 49, 53, 38, 56, 52, 107, 60, 115, 51, 64, 54, 59
Offset: 1

Views

Author

Paul Curtz, Nov 21 2021

Keywords

Comments

This is a permutation of the positive integers.
1, 2, 6, 9, 15, 19, ... are in a(n) and A064664(n).

Crossrefs

Programs

  • Mathematica
    nmax = 120;
    ekg[n_] := ekg[n] = Module[{ee, k}, If[n <= 2, n, ee = Array[ekg, n - 1]; For[k = 1, True, k++, If[FreeQ[ee, k] && GCD[ekg[n - 1], k] != 1, Return[k]]]]];
    b[n_] := Quotient[ekg[n] - 1, 2] + 1;
    bb = Array[b, nmax];
    TakeWhile[Table[Position[bb, n], {n, 1, nmax}], Length[#] == 2&] // Flatten (* Jean-François Alcover, Nov 21 2021 *)

Formula

Interleave the occurrences in A164912.
Previous Showing 21-30 of 31 results. Next