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.

A302774 a(n) is the position of the first term in A303762 that has prime(n) as one of its prime factors.

Original entry on oeis.org

1, 2, 4, 8, 15, 31, 50, 102, 157, 317, 480, 964, 1451, 2907, 4366, 8738, 13113, 26233, 39356, 78720, 118087, 236183, 354282, 708574, 1062869
Offset: 1

Views

Author

Antti Karttunen, May 04 2018

Keywords

Comments

Equivalently, a(n) is the position of the first term k in A303769 for which 1+A000523(k) = n.
The first differences A303749 indicate how many terms were produced in each round of A303762 before the algorithm started outputting numbers with next larger prime as their greatest prime factor.

Crossrefs

Programs

  • PARI
    prev=0; for(n=0,2^16,if(1==((p2=A061395(A303762(n)))-prev),print1(n,", ")); prev=p2);
    
  • PARI
    allocatemem(2^30);
    default(parisizemax,2^31);
    up_to = (2^25)+2;
    A053669(n) = forprime(p=2, , if (n % p, return(p))); \\ From A053669
    A061395(n) = if(1==n, 0, primepi(vecmax(factor(n)[, 1])));
    m_inverses = Map();
    q2 = 0; prev=1; for(n=1,up_to,found_it = 0; fordiv(prev,d,if(!mapisdefined(m_inverses,(prev/d)),found_it = (prev/d);mapput(m_inverses,(prev/d),n);break)); if(!found_it, apu = prev; while(mapisdefined(m_inverses,try = prev*A053669(apu)), apu *= A053669(apu)); found_it = try; mapput(m_inverses,try,n)); if((q1=A061395(found_it)) != q2, write("b302774.txt", q1, " ", n-1); write("b302775.txt", q1, " ", found_it)); prev = found_it; q2 = q1);