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.

A137613 Omit the 1's from Rowland's sequence f(n) - f(n-1) = gcd(n,f(n-1)), where f(1) = 7.

Original entry on oeis.org

5, 3, 11, 3, 23, 3, 47, 3, 5, 3, 101, 3, 7, 11, 3, 13, 233, 3, 467, 3, 5, 3, 941, 3, 7, 1889, 3, 3779, 3, 7559, 3, 13, 15131, 3, 53, 3, 7, 30323, 3, 60647, 3, 5, 3, 101, 3, 121403, 3, 242807, 3, 5, 3, 19, 7, 5, 3, 47, 3, 37, 5, 3, 17, 3, 199, 53, 3, 29, 3, 486041, 3, 7, 421, 23
Offset: 1

Views

Author

Jonathan Sondow, Jan 29 2008, Jan 30 2008

Keywords

Comments

Rowland proves that each term is prime. He says it is likely that all odd primes occur.
In the first 5000 terms, there are 965 distinct primes and 397 is the least odd prime that does not appear. - T. D. Noe, Mar 01 2008
In the first 10000 terms, the least odd prime that does not appear is 587, according to Rowland. - Jonathan Sondow, Aug 14 2008
Removing duplicates from this sequence yields A221869. The duplicates are A225487. - Jonathan Sondow, May 03 2013

Examples

			f(n) = 7, 8, 9, 10, 15, 18, 19, 20, ..., so f(n) - f(n-1) = 1, 1, 1, 5, 3, 1, 1, ... and a(n) = 5, 3, ... .
From _Vladimir Shevelev_, Mar 03 2010: (Start)
  a(1) = Lpf(6-1) = 5;
  a(2) = Lpf(6-2+5) = 3;
  a(3) = Lpf(6-3+5+3) = 11;
  a(4) = Lpf(6-4+5+3+11) = 3;
  a(5) = Lpf(6-5+5+3+11+3) = 23. (End)
		

Crossrefs

f(n) = f(n-1) + gcd(n, f(n-1)) = A106108(n) and f(n) - f(n-1) = A132199(n-1).

Programs

  • Haskell
    a137613 n = a137613_list !! (n-1)
    a137613_list =  filter (> 1) a132199_list
    -- Reinhard Zumkeller, Nov 15 2013
    
  • Maple
    A137613_list := proc(n)
    local a, c, k, L;
    L := NULL; a := 7;
    for k from 2 to n do
        c := igcd(k,a);
        a := a + c;
        if c > 1 then L:=L,c fi;
    od;
    L end:
    A137613_list(500000); # Peter Luschny, Nov 17 2011
  • Mathematica
    f[1] = 7; f[n_] := f[n] = f[n - 1] + GCD[n, f[n - 1]]; DeleteCases[Differences[Table[f[n], {n, 10^6}]], 1] (* Alonso del Arte, Nov 17 2011 *)
  • PARI
    ub=1000; n=3; a=9; while(nDaniel Constantin Mayer, Aug 31 2014
    
  • Python
    from itertools import count, islice
    from math import gcd
    def A137613_gen(): # generator of terms
        a = 7
        for n in count(2):
            if (b:=gcd(a,n)) > 1: yield b
            a += b
    A137613_list = list(islice(A137613_gen(),20)) # Chai Wah Wu, Mar 14 2023

Formula

Denote by Lpf(n) the least prime factor of n. Then a(n) = Lpf( 6-n+Sum_{i=1..n-1} a(i) ). - Vladimir Shevelev, Mar 03 2010
a(n) = A168008(2*n+4) (conjectured). - Jon Maiga, May 20 2021
a(n) = A020639(A190894(n)). - Seiichi Manyama, Aug 11 2023

A168007 Jumping divisor sequence (see Comments lines for definition).

Original entry on oeis.org

1, 2, 4, 3, 6, 5, 10, 9, 12, 11, 22, 21, 24, 23, 46, 45, 48, 47, 94, 93, 96, 95, 100, 99, 102, 101, 202, 201, 204, 203, 210, 209, 220, 219, 222, 221, 234, 233, 466, 465, 468, 467, 934, 933, 936, 935, 940, 939, 942, 941, 1882, 1881, 1884, 1883, 1890, 1889, 3778, 3777, 3780, 3779, 7558, 7557, 7560, 7559
Offset: 1

Views

Author

Omar E. Pol, Nov 19 2009

Keywords

Comments

Consider the diagram with overlapping periodic curves that appears in the Links section (figure 2). The number of curves that contain the point [n,0] equals the number of divisors of n. The curve of diameter d represents the divisor d of n. Now consider only the lower part of the diagram (figure 3). Starting from point [1,0] we continue our journey walking along the semicircumference with smallest diameter not used previously (see the illustration of initial terms, figure 1). The sequence is formed by the values of n where the trajectory intercepts the x axis. - Omar E. Pol, Jan 14 2019

Crossrefs

Programs

  • PARI
    lista(nn) = {my(v=vector(nn, i, if(i<4, 2^i/2))); for(n=4, nn, if(v[n-1]%2, v[n]=v[n-1] + factor(v[n-1])[1, 1], v[n]=v[n-1] - 1)); v; } \\ Jinyuan Wang, Mar 14 2020
    
  • Python
    from itertools import count, islice
    from sympy import primefactors
    def A168007_gen(): # generator of terms
        yield (a := 1)
        for n in count(2):
            yield (a:=a+(min(primefactors(a),default=1) if a&1 or a==2 else -1))
    A168007_list = list(islice(A168007_gen(),20)) # Chai Wah Wu, Mar 14 2023

Formula

a(1) = 1; if a(n) is an even composite number then a(n+1) = a(n) - 1; otherwise a(n+1) = a(n) + A020639(a(n)). - Omar E. Pol, Jan 13 2019

Extensions

More terms from Omar E. Pol, Jan 12 2019

A168009 Numbers of A168007, in sorted order.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 9, 10, 11, 12, 21, 22, 23, 24, 45, 46, 47, 48, 93, 94, 95, 96, 99, 100, 101, 102, 201, 202, 203, 204, 209, 210, 219, 220, 221, 222, 233, 234, 465, 466, 467, 468, 933, 934, 935, 936, 939, 940, 941, 942, 1881, 1882, 1883, 1884, 1889, 1890, 3777
Offset: 1

Views

Author

Omar E. Pol, Nov 19 2009

Keywords

Crossrefs

Extensions

More terms from Jinyuan Wang, Mar 14 2020
Showing 1-3 of 3 results.