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.

A372286 a(n) = number of terms of A086893 that are in the interval [n, A371094(n)].

Original entry on oeis.org

1, 5, 2, 4, 2, 7, 1, 2, 2, 4, 2, 3, 2, 6, 1, 3, 1, 4, 2, 3, 2, 9, 1, 2, 1, 3, 1, 2, 2, 4, 2, 2, 2, 4, 2, 3, 2, 6, 2, 3, 2, 4, 2, 3, 2, 5, 2, 3, 2, 4, 2, 3, 2, 8, 1, 2, 1, 3, 1, 3, 1, 5, 1, 3, 1, 3, 1, 3, 1, 6, 1, 3, 2, 4, 2, 3, 2, 5, 2, 3, 2, 4, 2, 3, 2, 11, 1, 2, 1, 3, 1, 2, 1, 4, 1, 2, 1, 3, 1, 2, 1, 5, 1, 2, 1, 3
Offset: 0

Views

Author

Antti Karttunen (proposed by Ali Sada), Apr 28 2024

Keywords

Comments

a(n) is the number of nonzero terms of A096773 that are found in the interval [n, A371094(n)], inclusive.

Examples

			A086893 = 1, 3, 5, 13, 21, 53, 85, 213, 341, 853, 1365, 3413, 5461, ...
For n=0, A371094(0) = 1, and only the initial term of A086893 is in the interval [0, 1], therefore a(0) = 1.
For n=1, A371094(1) = 21, so the first five terms of A086893 are in the interval [1, 21], thus a(1) = 5.
For n=6, A371094(6) = 19, and in the interval [6, 19] there is only term 13 of A086893, thus a(6) = 1.
For n=35, A371094(35) = 213, so we count terms 53, 85, 213 of A086893, therefore a(35) = 3.
		

Crossrefs

Cf. A002450 (seems to give the positions of records).

Programs

  • PARI
    A086893(n) = (if(n%2, 2^(n+1), 2^(n+1)+2^(n-1))\3); \\ From A086893
    A371094(n) = { my(m=1+3*n, e=valuation(m,2)); ((m*(2^e)) + (((4^e)-1)/3)); };
    A372286(n) = { my(u=A371094(n), k1); for(i=1,oo,if(A086893(i)>=n,k1=i-1; break)); for(i=k1,oo,if(A086893(i)>u,return(i-k1-1))); };