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-2 of 2 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 */

A352955 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), starting with a(1) = 11 and a(2) = 19.

Original entry on oeis.org

11, 19, 3, 73, 5, 1163, 17, 2309, 3, 147773, 7, 2364361, 43, 75659509, 109, 605275963, 601, 732718084457515921, 2767, 1500606636968992603441, 145687, 192077649532031053094761, 10273, 103120902879077884687304760481759, 5036623
Offset: 1

Views

Author

Michel Marcus, Apr 11 2022

Keywords

Comments

a(26) > 4.34448*10^41. - Michael S. Branicky, Apr 12 2022

Crossrefs

Cf. A255562 (starting with 3,5).

Programs

  • 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 = 11, 19
        yield 11
        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(), 17))) # Michael S. Branicky, Apr 12 2022

Extensions

a(18)-a(25) from Michael S. Branicky, Apr 11 2022
Showing 1-2 of 2 results.