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

A258225 a(n) = A258083(n) / 3.

Original entry on oeis.org

7, 4, 1, 8, 5, 2, 9, 6, 3, 70, 37, 104, 71, 38, 105, 72, 39, 106, 73, 40, 107, 74, 41, 108, 75, 42, 109, 76, 43, 10, 77, 44, 11, 78, 45, 12, 79, 46, 13, 80, 47, 14, 81, 48, 15, 82, 49, 16, 83, 50, 17, 84, 51, 18, 85, 52, 19, 86, 53, 20, 87, 54, 21, 88, 55
Offset: 1

Views

Author

Reinhard Zumkeller, May 27 2015

Keywords

Comments

Permutation of the positive integers, inverse: A258226.

Crossrefs

Programs

  • Haskell
    a258225 = flip div 3 . a258083
    
  • PARI
    lista(nn) = {v = []; vs = vecsort(v); for (n=1, nn, k=3; pt = 10^(#digits(n)); while (! (((k % pt) == n) && !vecsearch(vs, k)), k+=3); v = concat(v, k); vs = vecsort(v); print1(k/3, ", "););} \\ Michel Marcus, Jun 26 2015

A258370 Primes as they appear in sequence {A258083(n)/3}.

Original entry on oeis.org

7, 5, 2, 3, 37, 71, 73, 107, 41, 109, 43, 11, 79, 13, 47, 83, 17, 19, 53, 89, 23, 59, 61, 29, 97, 31, 367, 701, 1039, 373, 709, 379, 1049, 383, 1051, 719, 389, 727, 1061, 1063, 397, 733, 67, 401, 739, 409, 743, 751, 419, 1087, 421, 757, 1091, 1093, 761, 1097, 431, 433, 101, 769, 103, 439, 773, 1109, 443, 113, 449, 787, 457, 127, 461
Offset: 1

Views

Author

Vladimir Shevelev, May 28 2015

Keywords

Comments

The sequence is a permutation of the primes.

Crossrefs

A258188 Smallest multiple of 7 not appearing earlier that ends with n.

Original entry on oeis.org

21, 42, 63, 14, 35, 56, 7, 28, 49, 210, 511, 112, 413, 714, 315, 616, 217, 518, 119, 420, 721, 322, 623, 224, 525, 126, 427, 728, 329, 630, 231, 532, 133, 434, 735, 336, 637, 238, 539, 140, 441, 742, 343, 644, 245, 546, 147, 448, 749, 350, 651, 252, 553, 154
Offset: 1

Views

Author

Keywords

Comments

a(10*n) = 10*a(n).
The sequence is a permutation of the positive multiples of 7. - Vladimir Shevelev, May 24 2015
A258329(n) = a(n) / 7 is a permutation of the positive integers. - Reinhard Zumkeller, May 27 2015

Crossrefs

Programs

  • Haskell
    import Data.List (isPrefixOf, delete)
    a258188 n = a258188_list !! (n-1)
    a258188_list = f 1 $ tail $ zip
       a008589_list $ map (reverse . show) a008589_list where
       f x ws = g ws where
         g ((u, vs) : uvs) = if isPrefixOf xs vs
                             then u : f (x + 1) (delete (u, vs) ws) else g uvs
         xs = reverse $ show x
  • Mathematica
    a[n_] := a[n] = For[k = 7, True, k = k + 7, If[Divisible[k - n, 10^IntegerLength[n]] && FreeQ[Array[a, n-1], k], Return[k]]]; Array[a, 54] (* Jean-François Alcover, Feb 07 2018 *)

A258217 Smallest multiple of 7 starting with n, that did not appear earlier.

Original entry on oeis.org

14, 21, 35, 42, 56, 63, 7, 84, 91, 105, 112, 126, 133, 140, 154, 161, 175, 182, 196, 203, 210, 224, 231, 245, 252, 266, 273, 28, 294, 301, 315, 322, 336, 343, 350, 364, 371, 385, 392, 406, 413, 420, 434, 441, 455, 462, 476, 483, 49, 504, 511, 525, 532, 546
Offset: 1

Views

Author

Keywords

Comments

The sequence is a permutation of the positive multiples of 7. - Vladimir Shevelev, May 24 2015
A258334(n) = a(n) / 7 is a permutation of the positive integers. - Reinhard Zumkeller, May 27 2015

Crossrefs

Programs

  • Haskell
    import Data.List (isPrefixOf, delete)
    a258217 n = a258217_list !! (n-1)
    a258217_list = f 1 $ tail $ zip a008589_list $ map show a008589_list where
       f x ws = g ws where
         g ((u, vs) : uvs) = if isPrefixOf (show x) vs
                             then u : f (x + 1) (delete (u, vs) ws) else g uvs
  • Mathematica
    a[1] = 14; a[n_] := a[n] = For[dn = IntegerDigits[n]; k = 7, True, k = k+7, dk = IntegerDigits[k]; lg = Min[Length[dn], Length[dk]]; If[Union[ Take[dk, lg] - Take[dn, lg]] == {0} && FreeQ[Array[a, n-1], k], Return[k]]]; Array[a, 54] (* Jean-François Alcover, Feb 09 2018 *)

A258190 Smallest prime not appearing earlier that ends with A045572(n).

Original entry on oeis.org

11, 3, 7, 19, 211, 13, 17, 419, 421, 23, 127, 29, 31, 233, 37, 139, 41, 43, 47, 149, 151, 53, 157, 59, 61, 163, 67, 269, 71, 73, 277, 79, 181, 83, 487, 89, 191, 193, 97, 199, 101, 103, 107, 109, 2111, 113, 1117, 3119, 3121, 1123, 4127, 1129, 131, 4133, 137, 4139, 2141, 2143, 5147, 11149, 1151, 1153, 4157, 4159, 2161, 1163, 167, 3169
Offset: 1

Views

Author

Vladimir Shevelev, May 23 2015

Keywords

Comments

Using Dirichlet's theorem, we conclude that every term exists. So the sequence is a permutation of the odd primes other than 5. Indeed, an odd prime p other than 5 is either in its natural place in A045572 or appears earlier than that.

Crossrefs

Programs

  • Maple
    r:= -1: Used:= 'Used':
    for n from 1 to 1000 do
      r:= r+2;
      if r mod 5 = 0 then r:= r+2 fi;
      d:= 10^(1+ilog10(r));
      for x from r by d do
        if isprime(x) and not assigned(Used[x]) then
          a[n]:= x;
          Used[x]:= true;
          break
        fi
      od
    od:
    seq(a[n],n=1..1000); # Robert Israel, May 27 2015
  • PARI
    \\with first line from A045572 by Charles R Greathouse IV
    a(n) = {n = 10*(n>>2)+[-1, 1, 3, 7][n%4+1]; my(d = digits(n),m = matrix(#d + 1, 2), w=0); m[1,2] = d[#d] - 10; for(i = 2, matsize(m)[1], m[i,1]=10^(i-2)*d[#d-i+2] + m[i-1,1]; if(m[i-1,1] == m[i,1],m[i,2]=m[i-1,2], j=m[i,1]==m[i-1,2]; while(!isprime(10^(i-1)*j+m[i,1]), j++); m[i,2]=10^(i-1)*j+m[i,1]));m[matsize(m)[1],2]} \\ David A. Corneth, May 25 2015
    
  • Python
    from sympy import isprime
    def aupton(terms):
        alst, aset = [], set()
        for n in range(1, terms+1):
            ending = 2*n - 1 + (n+1)//4 * 2 # A045572
            i, pow10 = ending, 10**len(str(ending))
            while i in aset or not isprime(i): i += pow10
            alst.append(i); aset.add(i)
        return alst
    print(aupton(68)) # Michael S. Branicky, Nov 03 2021

Formula

a(n) >= A045572(n). The equality holds iff A045572(n) is a prime that did not already appear as a(k), k
Showing 1-5 of 5 results.