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

A214674 Conway's subprime Fibonacci sequence.

Original entry on oeis.org

1, 1, 2, 3, 5, 4, 3, 7, 5, 6, 11, 17, 14, 31, 15, 23, 19, 21, 20, 41, 61, 51, 56, 107, 163, 135, 149, 142, 97, 239, 168, 37, 41, 39, 40, 79, 17, 48, 13, 61, 37, 49, 43, 46, 89, 45, 67, 56, 41, 97, 69, 83, 76, 53, 43, 48, 13
Offset: 1

Views

Author

Wouter Meeussen, Jul 25 2012

Keywords

Comments

Similar to the Fibonacci recursion starting with (1, 1), but each new nonprime term is divided by its least prime factor. Sequence enters a loop of length 18 after 38 terms on reaching (48, 13).

References

  • Siobhan Roberts, Genius At Play: The Curious Mind of John Horton Conway, Bloomsbury, 2015, pages xx-xxi.

Crossrefs

Programs

  • Mathematica
    guyKhoSal[{a_, b_}] := Block[{c, l, r}, c = NestWhile[(p = Tr[Take[#, -2]]; If[PrimeQ[p], q = p, q = p/Part[FactorInteger[p, FactorComplete -> False], 1, 1]]; Flatten[{#, q}]) &, {a, b}, FreeQ[Partition[#1, 2, 1], Take[#2, -2]] &, 2, 1000]; l = Length[c]; r = Tr@Position[Partition[c,2,1], Take[c,-2], 1, 1]; l-r-1; c]; guyKhoSal[{1,1}]
    f[s_List] := Block[{a = s[[-2]] + s[[-1]]}, If[ PrimeQ[a], Append[s, a], Append[s, a/FactorInteger[a][[1, 1]] ]]]; Nest[f, {1, 1}, 73] (* Robert G. Wilson v, Aug 09 2012 *)
  • PARI
    fatw(n,a=[0,1],p=[])={for(i=2,n,my(f=factor(a[i]+a[i-1])~);for(k=1,#f,setsearch(p,f[1,k])&next;f[2,k]--;p=setunion(p,Set(f[1,k]));break);a=concat(a,factorback(f~)));a}
    fatw(99) /* M. F. Hasler, Jul 25 2012 */

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

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

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

A214893 Conway's subprime Fibonacci sequence starting with (18, 5).

Original entry on oeis.org

18, 5, 23, 14, 37, 17, 27, 22, 7, 29, 18, 47, 13, 30, 43, 73, 58, 131, 63, 97, 80, 59, 139, 99, 119, 109, 114, 223, 337, 280, 617, 299, 458, 757, 405, 581, 493, 537, 515, 526, 347, 291, 319, 305, 312, 617, 929
Offset: 1

Views

Author

Wouter Meeussen, Jul 29 2012

Keywords

Comments

Similar to the Fibonacci recursion starting with (18, 5), but each new nonprime term is divided by its least prime factor. Sequence enters a loop of length 56 after 26 terms on reaching (119, 109).

Crossrefs

Programs

  • Mathematica
    see A214674
    nxt[{a_,b_}]:=Module[{c=a+b},{b,If[PrimeQ[c],c,c/FactorInteger[c][[1,1]]]}]; Transpose[NestList[nxt,{18,5},82]][[1]] (* Harvey P. Dale, Oct 19 2012 *)

A214894 Conway's subprime Fibonacci sequence starting with (10, 18).

Original entry on oeis.org

10, 18, 14, 16, 15, 31, 23, 27, 25, 26, 17, 43, 30, 73, 103, 88, 191, 93, 142, 47, 63, 55, 59, 57, 58, 23, 27
Offset: 1

Views

Author

Wouter Meeussen, Jul 29 2012

Keywords

Comments

Similar to the Fibonacci recursion starting with (10, 18), but each new nonprime term is divided by its least prime factor. Sequence enters a loop of length 19 after 8 terms on reaching (23, 27).

Crossrefs

Programs

A214895 Conway's subprime Fibonacci sequence starting with (23, 162).

Original entry on oeis.org

23, 162, 37, 199, 118, 317, 145, 231, 188, 419, 607, 513, 560, 37, 199
Offset: 1

Views

Author

Wouter Meeussen, Jul 29 2012

Keywords

Comments

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

Crossrefs

Programs

A214896 Conway's subprime Fibonacci sequence starting with (382, 127).

Original entry on oeis.org

382, 127, 509, 318, 827, 229, 528, 757, 257, 507, 382, 127
Offset: 1

Views

Author

Wouter Meeussen, Jul 29 2012

Keywords

Comments

Similar to the Fibonacci recursion starting with (382, 127), but each new nonprime term is divided by its least prime factor. Sequence enters a loop of length 10 after 2 terms on reaching (382, 127).

Crossrefs

Programs

Showing 1-9 of 9 results.