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

A160218 Index at which n-th prime occurs in A160256, or -1 if the prime never occurs.

Original entry on oeis.org

2, 3, 14, 20, 32, 301, 1065
Offset: 1

Views

Author

M. F. Hasler, May 06 2009

Keywords

Comments

A160256(a(n))=A000040(n) if and only if both Conjectures 1 and 2 are true:
Conjecture 1: Primes occur in A160256 in increasing order.
Conjecture 2: All primes occur in A160256.
Conjecture 3: Except for A160256(4)=4, the least positive integer which does not occur in A160256 up to a given index is always a prime (and thus of the form A160256(a(k)) for some k).
Conjecture 4: A160256(a(n)) is always the least positive integer which did not occur earlier in A160256.

Crossrefs

Programs

  • PARI
    list_A160218(n)={ my(a1=1,a2=1,S=[]); until( isprime(a1) & !print1(#S,",") & !n--, for( a=1,9e9, a*a1%a2 & next; setsearch(S,a) & next; a2=a1; S=setunion(S,Set(a1=a)); /*print1(a",");*/ next(2)); error);vecsort(eval(S)) }

Extensions

Edited by N. J. A. Sloane, May 16 2009

A151413 Index at which n occurs in A160256, or -1 if n never occurs.

Original entry on oeis.org

1, 2, 3, 4, 14, 5, 20, 6, 7, 12, 32, 11, 301, 22, 16, 8, 1065, 9
Offset: 1

Views

Author

N. J. A. Sloane, May 16 2009

Keywords

Comments

After a(19) which exceeds 10^7 but is still unknown, the sequence continues 18,24,34,a(23)=?,10,215,303,... - M. F. Hasler, May 16 2009

Crossrefs

Programs

  • Python
    from sympy import gcd
    def A151413(n):
        if n <= 2:
            return n
        else:
            l1, l2, m, b = 2, 1, 1, {1, 2}
            for j in range(3, 10**9):
                i = m
                while True:
                    if not i in b:
                        if i == n:
                            return j
                        l1, l2, m = i, l1, l1//gcd(l1, i)
                        b.add(i)
                        break
                    i += m
            return "search limit reached." # Chai Wah Wu, Dec 09 2014

Formula

A160218(n) = a(A000040(n)), conjectured. - M. F. Hasler, May 16 2009

Extensions

a(13)-a(18) from Robert Gerbicz and M. F. Hasler, May 16 2009

A151545 Records in A160256.

Original entry on oeis.org

1, 2, 3, 4, 6, 8, 9, 16, 18, 24, 30, 36, 48, 60, 120, 180, 240, 300, 360, 420, 840, 1260, 1680, 2100, 2520, 2940, 3360, 3780, 4125, 8250, 12375, 16500, 33000, 44000, 88000, 132000, 144060, 180075, 360150, 540225, 1080450, 1347500, 1358280, 1565256, 2087008, 3130512
Offset: 1

Views

Author

N. J. A. Sloane, May 17 2009

Keywords

Crossrefs

A151547 Indices of records in A160256.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 76, 78, 80, 82, 84, 90, 92, 94, 131, 137, 139, 141, 143, 334, 406, 646, 648, 650, 652, 654, 662, 810, 882, 1520, 1522, 1524, 1526, 1713, 1721, 2067, 2069, 2077, 2079, 2081
Offset: 1

Views

Author

N. J. A. Sloane, May 17 2009

Keywords

Crossrefs

A151546 When computing A160256(n), it must be a multiple of a(n).

Original entry on oeis.org

1, 2, 3, 2, 3, 8, 9, 8, 3, 2, 6, 1, 6, 5, 12, 5, 12, 1, 60, 7, 60, 7, 60, 7, 60, 7, 60, 7, 60, 1, 420, 11, 420, 11, 420, 11, 420, 11, 420, 11, 420, 11, 420, 11, 420, 22, 378, 55, 126, 55, 63, 220, 63, 440, 189, 880, 567, 880, 189, 220, 63, 55, 252, 275, 252, 275, 336, 275, 84, 275, 84
Offset: 3

Views

Author

N. J. A. Sloane, May 16 2009

Keywords

Comments

In other words, a(n) = numerator of b(n-2)/b(n-1), where b() = A160256().
Then b(n) = smallest multiple of a(n) not already present in A160256.

Programs

  • Maple
    bb:= proc(n) option remember; false end: b:= proc(n) option remember; local k, m; if n<3 then bb(n):= true; n else m:= denom(b(n-1) /b(n-2)); for k from m by m while bb(k) do od; bb(k):= true; k fi end: a:= n-> numer(b(n-2) /b(n-1)): seq(a(n), n=3..100); # Alois P. Heinz, May 17 2009
  • Mathematica
    bb[n_] := bb[n] = False;
    b[n_] := b[n] = Module[{k, m}, If[n < 3, bb[n] = True; n, m = Denominator[ b[n - 1] /b[n - 2]]; For[ k = m , bb[k], k += m]; bb[k] = True; k ]];
    a[n_] := Numerator[b[n - 2] /b[n - 1]];
    Table[a[n], {n, 3, 100}]

A160257 a(n) = b(n+2)*b(n+1)/b(n), where b() = A160256().

Original entry on oeis.org

6, 6, 8, 12, 12, 18, 32, 27, 16, 5, 25, 15, 6, 108, 20, 64, 25, 21, 14, 240, 21, 270, 28, 320, 35, 375, 42, 432, 49, 110, 22, 1680, 33, 1890, 44, 2240, 55, 2625, 66, 3024, 77, 3430, 88, 3840, 99, 4725, 11, 567, 55, 168, 110, 126, 1320, 378, 2640, 1134, 3520, 1701
Offset: 1

Views

Author

Leroy Quet, May 06 2009

Keywords

Comments

By definition, each term of this sequence is a positive integer.

Crossrefs

Programs

  • Maple
    bb:= proc(n) option remember; false end: b:= proc(n) option remember; local k, m; if n<3 then bb(n):= true; n else m:= denom(b(n-1) /b(n-2)); for k from m by m while bb(k) do od; bb(k):= true; k fi end: a:= n-> b(n+2) *b(n+1) /b(n): seq(a(n), n=1..100); # Alois P. Heinz, May 18 2009
  • Mathematica
    bb[_] = False;
    b[n_] := b[n] = Module[{k, m}, If[n<3, bb[n] = True; n, m = Denominator[ b[n-1]/b[n-2]]; For[k = m, bb[k], k += m]; bb[k] = True; k]];
    a[n_] := b[n+2] b[n+1]/b[n];
    Array[a, 100] (* Jean-François Alcover, Nov 12 2020, after Alois P. Heinz *)

Extensions

More terms from Alois P. Heinz, May 18 2009

A075075 a(1) = 1, a(2) = 2 and then the smallest number not occurring earlier such that every term divides the product of its neighbors: a(n-1)*a(n+1)/a(n) is an integer.

Original entry on oeis.org

1, 2, 4, 6, 3, 5, 10, 8, 12, 9, 15, 20, 16, 24, 18, 21, 7, 11, 22, 14, 28, 26, 13, 17, 34, 30, 45, 27, 33, 44, 32, 40, 25, 35, 42, 36, 48, 52, 39, 51, 68, 56, 70, 50, 55, 66, 54, 63, 49, 77, 88, 64, 72, 81, 90, 60, 38, 19, 23, 46, 58, 29, 31, 62, 74, 37, 41, 82, 76, 114, 57, 43
Offset: 1

Views

Author

Amarnath Murthy, Sep 09 2002

Keywords

Comments

This is a permutation of natural numbers. [Leroy Quet asks (May 06 2009) if this is a theorem or just a conjecture.]
Every time a(n) divides a(n-1), a(n+1) is the next number that is not already in the sequence. I don't have a proof that a(n) divides a(n-1) infinitely often. - Franklin T. Adams-Watters, Jun 12 2014
It appears that a(n): 1,2,...,3,5,...,7,11,...,prime(2k),prime(2k+1),... - Thomas Ordowski, Jul 10 2015
The primes do appear to occur in increasing order, but prime(2k) is not always followed directly by prime(2k+1). For example, a(72) = 43 = prime(14), but a(125) = 47 = prime(15). - Robert Israel, Jul 10 2015
If a(n) and a(n+1) are primes then a(n) divides a(n-1). - Thomas Ordowski, Jul 10 2015 [Cf. second comment]
a(n) is the least multiple of a(n-1)/gcd(a(n-2),a(n-1)) that has not previously occurred. - Robert Israel, Jul 10 2015
Conjecture: if a(n) divides a(n-1) then a(n+1) is prime. - Thomas Ordowski, Jul 11 2015
It seems that a(n) and a(n+1) are consecutive primes if and only if a(n) divides a(n-1) and a(n) < a(n+1). - Thomas Ordowski, Jul 13 2015

Crossrefs

Cf. A075076 (ratios), A160256, A064413 (EKG sequence).
Cf. A160516 (inverse), A185635 (fixed points).

Programs

  • Haskell
    import Data.List (delete)
    a075075 n = a075075_list !! (n-1)
    a075075_list = 1 : 2 : f 1 2 [3..] where
      f z z' xs = g xs where g (u:us) =
        if (z * u) `mod` z' > 0 then g us else u : f z' u (delete u xs)
    -- Reinhard Zumkeller, Dec 19 2012
    
  • MATLAB
    N = 10^6;
    Avail = ones(1,N);
    A = zeros(1,N);
    A(1) = 1; A(2) = 2;
    Avail([1,2]) = 0;
    for n=3:N
      q = round(A(n-1)/gcd(A(n-1),A(n-2)));
      b = find(Avail(q*[1:floor(N/q)]),1,'first');
      if numel(b) == 0
         break
      end
      A(n) = q*b;
      Avail(A(n)) = 0;
    end
    A = A(1:n-1); % Robert Israel, Jul 10 2015
  • Maple
    b:= proc(n) option remember; false end: a:= proc(n) option remember; local k, m; if n<3 then b(n):= true; n else m:= denom(a(n-2) /a(n-1)); for k from m by m while b(k) do od; b(k):= true; k fi end: seq(a(n), n=1..100); # Alois P. Heinz, May 16 2009
  • Mathematica
    f[s_List] := Block[{m = Numerator[ s[[ -1]]/s[[ -2]] ]}, k = m; While[ MemberQ[s, k], k += m]; Append[s, k]]; Nest[f, {1, 2}, 70] (* Robert G. Wilson v, May 20 2009 *)
  • Python
    from math import gcd
    A075075_list, l1, l2, m, b = [1,2], 2, 1, 2, {1,2}
    for _ in range(10**3):
        i = m
        while True:
            if not i in b:
                A075075_list.append(i)
                l1, l2, m = i, l1, i//gcd(l1,i)
                b.add(i)
                break
            i += m # Chai Wah Wu, Dec 09 2014
    

Extensions

More terms from Sascha Kurz, Feb 03 2003
Showing 1-7 of 7 results.