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

A067149 Indices of records of A067148.

Original entry on oeis.org

1, 2, 5, 11, 23, 53, 293, 24773, 422573, 86203853
Offset: 1

Views

Author

John W. Layman, Jan 04 2002

Keywords

Comments

For the known terms, A067148(a(n))=n+1, a(n) is odd for n>2 and a(n)==2 (mod 3) for n>1. Do these trends continue?

Crossrefs

Cf. A067148.

Programs

  • Mathematica
    a[ n_ ] := Module[ {}, If[ n==2, Return[ 1 ] ]; For[ f0=3; f1=2; f2=1; c=0, f0<=n, f0=(f2=f1)+(f1=f0), If[ Mod[ n-f0, f2 ]==0, c++ ] ]; c ]; For[ n=1; max=-1, True, n++, If[ a[ n ]>max, Print[ n ]; max=a[ n ] ] ]

Extensions

Last term from Dean Hickerson, Jan 12 2002

A067150 Number of integers i=1,2,...,n such that (n,i) has Property F3*, i.e., i and n are consecutive terms of a sequence b(k) satisfying b(1)=1, b(n) = (b(n-1) OR 2*b(n-1)) + b(n-2), where the OR is taken bitwise.

Original entry on oeis.org

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

Views

Author

John W. Layman, Jan 05 2002

Keywords

Comments

Surprisingly, for k > 0, we find that a(2^k) = F(k-1), where {F(n)} is the sequence of Fibonacci numbers (A000045). Also, except for n = 2^3 = 8, these values are exactly those where new records in a(n) are made.
The definition can be restated as follows: a(n) is the number of integers i, 0 < i < n such that i and n are consecutive terms of some sequence b(k) satisfying b(1)=1 and b(k) = 3#b(k-1) + b(k-2), where # denotes OR-numbral multiplication (see A048888 for the definition).
If the OR-numbral multiplier 3 in the definition is replaced by 7, the resulting sequence has as record values the tribonacci numbers in A000073.

Crossrefs

A340862 Number of times the number n turns up in pseudo-Fibonacci sequences starting with [k, 1] (with k >= 1), excluding the starting terms.

Original entry on oeis.org

0, 1, 2, 2, 3, 2, 3, 3, 3, 2, 4, 2, 4, 3, 3, 2, 4, 3, 3, 3, 4, 2, 5, 2, 3, 3, 3, 3, 5, 2, 3, 3, 4, 3, 4, 2, 4, 4, 3, 2, 4, 2, 4, 3, 4, 2, 5, 3, 3, 3, 3, 2, 6, 2, 4, 3, 3, 3, 4, 3, 4, 3, 4, 2, 4, 2, 3, 4, 4, 2, 4, 2, 5, 3, 3, 3, 5, 3, 3, 3, 3, 2, 5, 2, 4, 4, 3, 3
Offset: 1

Views

Author

Robby Goetschalckx, Jan 24 2021

Keywords

Comments

In the first 100000 terms, this never exceeds 8. For any n > 2, a(n) will be at least 2, since k=n-1 and k=n-2 will both work.
Conjecture: for n > 2, a(n) appears to be equal to 1 + A067148(n).

Examples

			For n=2, the single solution is the third term of the Fibonacci sequence (k=1), so a(2)=1.
For n=3, we observe the value as the fourth term for k=1, and the third term for k=2 for a total count of a(3) = 2.
For n=4, we have k=2 and k=3, so a(4) = 2.
For n=5, we have k=1, k=3, k=4.
		

Crossrefs

Programs

  • PARI
    a(n) = my(c, x, y=1); while(n>=x+=2*y, y=x-y; x-=y; if((n-y)%x==0, c++)); c; \\ Jinyuan Wang, Mar 20 2021
  • Python
    def get_val(n):
        res = 0
        for k in range(1, n):
            (a, b) = (k, 1)
            while b < n:
                (a, b) = (b, a+b)
                if b == n:
                    res += 1
        return res
    

Extensions

Offset changed and a(1) inserted by Jinyuan Wang, Mar 20 2021
Showing 1-3 of 3 results.