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-10 of 14 results. Next

A214892 Conway's subprime Fibonacci sequence starting with (4,1).

Original entry on oeis.org

4, 1, 5, 3, 4, 7, 11, 9, 10, 19, 29, 24, 53, 11, 32, 43, 25, 34, 59, 31, 45, 38, 83, 11, 47, 29, 38, 67, 35, 51, 43, 47, 45, 46, 13, 59, 36, 19, 11, 15, 13, 14, 9, 23, 16, 13, 29, 21, 25, 23, 24, 47, 71, 59, 65, 62, 127, 63, 95, 79, 87, 83, 85, 84, 13, 97, 55, 76, 131, 69, 100, 13, 113
Offset: 1

Views

Author

Wouter Meeussen, Jul 29 2012

Keywords

Comments

Similar to the Fibonacci recursion starting with (4, 1), but each new nonprime term is divided by its least prime factor. Sequence enters a loop of length 136 after 8 terms on reaching (11, 9).

Crossrefs

Programs

  • Mathematica
    (* see A214674 *)
    a[1] = 4; a[2] = 1; a[n_] := a[n] = If[an = a[n-2]+a[n-1]; PrimeQ[an], an, an/FactorInteger[an][[1, 1]]]; Array[a, 80] (* Jean-François Alcover, Nov 17 2018 *)

A214898 Conway's subprime Fibonacci sequence, largest loop elements.

Original entry on oeis.org

2, 827, 607, 239, 191, 5693, 347
Offset: 1

Views

Author

Wouter Meeussen, Jul 29 2012

Keywords

Comments

Similar to the Fibonacci recursion starting with a pair of positive integers, but each new nonprime term is divided by its least prime factor. Recursion enters a loop of length A214897(n), of which the largest element a(n) is prime (this sequence).

Crossrefs

Programs

A272636 a(0)=0, a(1)=1; thereafter a(n) = squarefree part of a(n-1)+a(n-2).

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, May 05 2016

Keywords

Comments

Periodic with period {1,2,3,5,2,7}.
James Propp, in a posting to the Math Fun list, asks if every sequence of positive numbers satisfying the same recurrence will eventually merge with this sequence (as A272638 does). The answer is no, Fred W. Helenius found infinitely many counterexamples, including A272637. See A272639 for other counterexamples which start 1,x.
Other counterexamples found by Helenius include [n, 2n, 3n, 5n, 2n, 7n] (period 6) where n is any squarefree positive integer coprime to 210 = 2*3*5*7.

Crossrefs

Cf. A007913 (squarefree part of n), A000045, A272637, A272638, A272639.
See A165911 for a similar sequence.

Programs

  • Mathematica
    {0, 1}~Join~LinearRecurrence[{0, 0, 0, 0, 0, 1}, {1, 2, 3, 5, 2, 7}, 120] (* Jean-François Alcover, Nov 16 2019 *)
  • Python
    from sympy.ntheory.factor_ import core
    l=[0, 1]
    for n in range(2, 101):
        l.append(core(l[n - 1] + l[n - 2]))
    print(l) # Indranil Ghosh, Jun 03 2017

A282813 Table read by antidiagonals (n > 0, k > 0): T(n, k) is the starting index of the first loop in Conway's subprime Fibonacci sequence with starting values of n and k.

Original entry on oeis.org

38, 47, 37, 38, 1, 46, 7, 45, 36, 7, 47, 37, 1, 34, 6, 60, 38, 33, 4, 44, 34, 8, 35, 5, 1, 35, 8, 59, 47, 37, 2, 34, 6, 3, 37, 79, 7, 45, 36, 7, 1, 73, 32, 103, 45, 24, 44, 78, 58, 72, 30, 3, 3, 100, 78, 35, 9, 4, 74, 31, 1, 43, 35, 74, 35, 23, 55, 108, 35, 98
Offset: 1

Views

Author

Peter Kagey, Feb 21 2017

Keywords

Examples

			T(1, 1) = 38 because 38 is the starting index of the first loop in Conway's subprime Fibonacci sequence when starting with 1, 1 (A214674). (i.e. A214674(n) = A214674(n + k) for n >= 38 = T(1, 1) and k = A282814(1,1).)
Upper-left corner of table:
   38  37  46   7   6  34  59  79  45  78 ...
   47   1  36  34  44   8  37 103 100  35 ...
   38  45   1   4  35   3  32   3  74  92 ...
    7  37  33   1   6  73   3  35  50  98 ...
   47  38   5  34   1  30  43  55 105   3 ...
   60  35   2   7  72   1  33  33  45  22 ...
    8  37  36  58  31  42   1 103  75  52 ...
   47  45  78  74 102  34  32   1  20  61 ...
    7  44   4  98  44  73 104  74   1   1 ...
   24   9  35   4   2  34  97  21  60   1 ...
  ...
		

Crossrefs

A282814 Table read by antidiagonals (n > 0, k > 0): T(n, k) is the length of the loop in Conway's subprime Fibonacci sequence with starting values of n and k.

Original entry on oeis.org

18, 18, 18, 18, 1, 18, 136, 18, 18, 136, 18, 18, 1, 18, 136, 18, 18, 18, 136, 18, 18, 136, 18, 136, 1, 18, 136, 18, 18, 18, 1, 18, 136, 1, 18, 18, 136, 18, 18, 136, 1, 18, 18, 136, 18, 18, 18, 18, 18, 18, 18, 136, 136, 136, 18, 18, 136, 1, 18, 18, 1, 18, 18
Offset: 1

Views

Author

Peter Kagey, Feb 21 2017

Keywords

Comments

All terms are in A214897, which is conjectured to be finite. - Peter Kagey, Nov 04 2017

Examples

			T(1, 1) = 18 because 18 is the loop length in Conway's subprime Fibonacci sequence when starting with 1, 1 (A214674). (i.e., A214674(n) = A214674(n + 18) for n >= 38 = A282813(1, 1).)
Upper-left corner of table:
   18  18  18 136 136  18  18  18  18  18 ...
   18   1  18  18  18 136  18 136 136  18 ...
   18  18   1 136  18   1  18 136  18  18 ...
  136  18  18   1 136  18 136  18  18 136 ...
   18  18 136  18   1  18  18  18 136   1 ...
   18  18   1 136  18   1  18  18  18  18 ...
  136  18  18  18  18  18   1 136  18  18 ...
   18  18  18  18 136  18  18   1  18  18 ...
  136  18   1  18  18  18 136  18   1 136 ...
   18 136  18 136   1  18 136  18  18   1 ...
  ...
		

Crossrefs

A165911 a(n) = squarefree kernel (or radical) of a(n-1) + a(n-2), with a(0)=0 and a(1)=1.

Original entry on oeis.org

0, 1, 1, 2, 3, 5, 2, 7, 3, 10, 13, 23, 6, 29, 35, 2, 37, 39, 38, 77, 115, 6, 11, 17, 14, 31, 15, 46, 61, 107, 42, 149, 191, 170, 19, 21, 10, 31, 41, 6, 47, 53, 10, 21, 31, 26, 57, 83, 70, 51, 11, 62, 73, 15, 22, 37, 59, 6, 65, 71, 34, 105, 139, 122, 87, 209, 74, 283, 357, 10
Offset: 0

Views

Author

Keywords

Comments

The squarefree kernel (or radical) of n is the largest squarefree divisor of n, A007947.
Through n=1688, this sequence does not loop. Does it grow indefinitely, or is it eventually periodic?
The graph suggests that the sequence had a chance to go into a cycle between terms 100 and 150, but by the time we get to 1688 terms the sequence seems to have reached escape velocity and there is no further hope of this happening. (Of course this is not a rigorous argument.) - N. J. A. Sloane, May 06 2016
If we take the squarefree part (A007913) instead of the squarefree kernel, the sequence is periodic from n=1, repeating 1,2,3,5,2,7. See A272636.
From Fred W. Helenius, May 07 2016: (Start)
There are many examples of initial conditions for this recurrence that produce sequences that cycle.
Examples that arise where a(0) and a(1) are not coprime:
- 2, 2 (period 1)
- 3, 3, 6, 3, 3, 6 (period 3)
- 5, 10, 15, 5, 10, 15 (period 3)
Examples of periodic sequences starting with coprime initial values:
- 15 146 161 307 78 385 463 106 569 (period 9)
- 222 1589 1811 170 1981 717 2698 3415 6113 2382 8495 10877 9686 20563 10083 30646 3133 33779 4614 38393 43007 4070 47077 17049 64126 16235 26787 6146 32933 39079 36006 75085 111091 5818 5083 10901 (period 46)
- 770 559 1329 118 1447 1565 1506 3071 4577 478 5055 5533 5294 1203 6497 (period 15)
(End)

Crossrefs

Cf. A007947.
See A000045, A272636, A272637, A272638, A272639 for similar sequences. See also A214674, A214892-A214898.

Programs

  • Mathematica
    nxt[{a_,b_}]:={b,Select[Divisors[a+b],SquareFreeQ][[-1]]}; NestList[nxt,{0,1},70][[All,1]] (* Harvey P. Dale, Jul 31 2018 *)
  • PARI
    rad(n)=local(fm);fm=factor(n);prod(k=1,matsize(fm)[1],fm[k,1])
    v=vector(100,n,1);for(n=3,100,v[n]=rad(v[n-1]+v[n-2]))
    
  • Python
    from operator import mul
    from sympy import primefactors
    from functools import reduce
    def rad(n): return 1 if n<2 else reduce(mul, primefactors(n))
    l=[0, 1]
    for n in range(2, 101):
        l.append(rad(l[n - 1] + l[n - 2]))
    print(l) # Indranil Ghosh, Jun 03 2017

A282812 Table read by antidiagonals (n > 0, k > 0): T(n, k) is the largest value in Conway's subprime Fibonacci sequence with starting values of n and k.

Original entry on oeis.org

239, 239, 239, 239, 2, 239, 347, 239, 239, 347, 239, 239, 3, 239, 347, 239, 239, 239, 347, 239, 239, 347, 239, 347, 4, 239, 347, 239, 239, 239, 6, 239, 347, 6, 239, 239, 347, 239, 239, 347, 5, 239, 239, 463, 239, 97, 239, 239, 239, 239, 239, 347, 347, 463
Offset: 1

Views

Author

Peter Kagey, Feb 21 2017

Keywords

Examples

			T(1, 1) = 239 because 239 is the largest value in Conway's subprime Fibonacci sequence when starting with 1, 1 (A214674).
Upper-left corner of table:
  239 239 239 347 347 239 239 239 239 239 ...
  239   2 239 239 239 347 239 463 463 239 ...
  239 239   3 347 239   6 239 347 239 239 ...
  347 239 239   4 347 239 347 239 239 463 ...
  239 239 347 239   5 239 239 239 463  10 ...
  239 239   6 347 239   6 239 239 239 109 ...
  347 239 239 239 239 239   7 463 239 239 ...
  239 239 239 239 463 239 239   8 109 239 ...
  347 239   9 733 239 239 463 239   9 347 ...
   97 347 239 347  10 239 463 109 239  10 ...
  ...
		

Crossrefs

A214897 Conway's subprime Fibonacci sequence: cycle lengths.

Original entry on oeis.org

1, 10, 11, 18, 19, 56, 136
Offset: 1

Views

Author

Wouter Meeussen, Jul 29 2012

Keywords

Comments

Similar to the Fibonacci recursion starting with a pair of positive integers, but each new nonprime term is divided by its least prime factor. The recursion enters a loop of length a(n) after a finite number of steps. Conjecture: the list of loops is complete (checked to [10^5, 10^5]), loops of length a(n) are unique and no infinite chains exist.

Crossrefs

Programs

A255562 A reversed prime Fibonacci sequence: a(n+2) is the smallest odd prime such that a(n) is the smallest odd prime divisor of a(n+1)+a(n+2).

Original entry on oeis.org

3, 5, 7, 3, 11, 7, 37, 19, 277, 331, 223, 439, 7, 406507, 67, 330515394367, 967, 10576492618777, 116041, 223724392248491824062507397, 3691561, 100105207373914057144918297314160710207525630111509317, 423951181
Offset: 1

Views

Author

Jeremy F. Alm, Jul 10 2015

Keywords

Comments

The sequence satisfies a(1) = 3, a(2) = 5, and a(n+2) is the smallest odd prime with the following property: a(n) is the smallest odd prime divisor of a(n+1)+a(n+2). It is a provably infinite sequence. It is also the "reverse" of a prime Fibonacci sequence terminating in 5,3. A prime Fibonacci sequence satisfies the following relation: a(n+2) is the smallest odd prime dividing a(n)+a(n+1), unless a(n)+a(n+1) is a power of two, in which case the sequence terminates. Prime Fibonacci sequences provably terminate, but provably can be extended indefinitely to the left.

Crossrefs

Cf. A214674, A352955 (starting with 11,19).

Programs

  • PARI
    lista(nn) = {print1(pp=3, ", "); print1(p=5, ", "); for (n=1, nn, forprime(q=3, , s = (p+q)/ 2^(valuation(p+q, 2)); if ((s!=1) && pp == factor(s)[1,1], np = q; break);); print1(np, ", "); pp = p; p = np;);} \\ Michel Marcus, Jul 11 2015
  • Python
    import math
    def sieve(n):
        r = int(math.floor(math.sqrt(n)))
        composites = [j for i in range(2,r+1) for j in range(2*i, n, i)]
        primes = set(range(2,n)).difference(set(composites))
        return sorted(primes)
    Primes = sieve(1000000)
    Odd_primes = Primes[1:]
    def find_smallest_odd_div(n):
        for p in Odd_primes:
            if n % p == 0:
                return p
    def next_term(a,b):
        for p in Odd_primes:
            if (p + b) % a == 0:
                if find_smallest_odd_div(p+b) == a:
                    return p
    def compute_reversed_seq(a,b):
        seq = [a,b]
        while seq[-1] != None:
            seq.append(next_term(seq[-2],seq[-1]))
        return seq[:len(seq)-1]
    print(compute_reversed_seq(3,5))
    
  • Python
    from sympy import isprime, factorint
    from itertools import islice
    def rem2(n):
        while n%2 == 0: n //= 2
        return n
    def agen():
        b, c = 3, 5
        yield 3
        while True:
            yield c
            k = (c+2)//b + 1
            m = b*k
            while not isprime(m-c) or min(factorint(rem2(k)), default=b+1) < b:
                m += b
                k += 1
            b, c = c, m-c
    print(list(islice(agen(), 19))) # Michael S. Branicky, Apr 12 2022
    

Extensions

a(16)-a(23) from Giovanni Resta, Jul 17 2015

A117339 a(n) = a(n-1) + a(n-2); if a(n) is not prime divide a(n) by its largest prime factor.

Original entry on oeis.org

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

Views

Author

Zak Seidov, Mar 09 2006

Keywords

Comments

Sequence repeats cyclically. Conjecture: sequence ends with cycle for any positive a(1) and a(2). This has been checked for a(1)=1 and a(2)=1,...,2000. Some other cases shown below: a(1), a(2), length of s, sequence s 1,1,10,{1,1,2,3,5,4,3,7,2,3}, 1,2,9,{1,2,3,5,4,3,7,2,3}, 1,3,9,{1,3,2,5,7,4,11,3,2}, 1,4,20,{1,4,5,3,4,7,11,6,17,23,8,31,3,2,5,7,4,11,3,2}, 1,5,12,{1,5,2,7,3,2,5,7,4,11,3,2}, 1,6,23,{1,6,7,13,4,17,3,4,7,11,6,17,23,8,31,3,2,5,7,4,11,3,2}, 1,7,9,{1,7,4,11,3,2,5,7,4}, 1,8,30,{1,8,3,11,2,13,3,8,11,19,6,5,11,8,19,9,4,13,17,6,23,29,4,3,7,2,3,5,4,3}, 1,9,34,{1,9,2,11,13,8,3,11,2,13,3,8,11,19,6,5,11,8,19,9,4,13,17,6,23,29,4,3,7,2,3,5,4,3}, 1,10,10,{1,10,11,3,2,5,7,4,11,3}. Even exotic seeds give no long sequences, e.g. 967,3000,24,{967,3000,3967,6967,154,7121,75,28,103,131,18,149,167,4,9,13,2,3,5,4,3,7,2,3}. For a(1)=1, maximal length = 55 is found for a(2)=1207: 1,1207,55,{1,1207,8,243,251,26,277,3,40,43,83,18,101,7,36,43,79,2,27,29,8,37,9,2,11,13,8,3,11,2,13,3,8,11,19,6,5,11,8,19,9,4,13,17,6,23,29,4,3,7,2,3,5,4,3}.

Crossrefs

Cf. A214674.

Formula

G.f.: -(6*x^8+2*x^7+4*x^6+5*x^5+3*x^4+2*x^3+x^2+x)/(x^6-1). - Alois P. Heinz, Apr 20 2023
Showing 1-10 of 14 results. Next