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

A213407 First occurrence of n in A213381.

Original entry on oeis.org

2, 0, 3, 5, 4, 9, 8, 7, 12, 17, 594270126787, 21, 20, 13, 24, 29, 16, 23, 32, 19, 36, 41, 1356, 45, 38, 151, 51, 411, 994, 57, 56, 31, 60, 65, 52, 69, 71, 37, 72, 77, 490, 81, 80, 169, 84, 6125, 68, 1043, 92, 49, 99, 101, 304, 105, 104, 55, 111, 63, 73, 89, 116, 61, 120, 125, 78, 129, 188, 67, 93, 137, 97, 18349355, 140, 433
Offset: 0

Views

Author

Alex Ratushnyak, Jun 10 2012

Keywords

Examples

			Smallest n such that A213381(n)=9 is 17, so a(9)=17.
		

Crossrefs

Programs

  • C
    #include  // GCC -O3 -fopenmp
    #include   // 11 minutes
    #define SIZE 4096
    #define STEP 0x1000000
    long long first[SIZE];
    int main(int argc, char **argv)
    {
        unsigned long long a, i;
        for (a=0; a0; p=(p*p)%b, t>>=1) {
                if (t&1) r=(r*p)%b;
            }
            if (r
    				

Formula

a(n) = smallest k>n such that (-2)^k == n (mod k+2).

Extensions

Terms a(10) onward from Max Alekseyev, Jan 31 2014
Showing 1-1 of 1 results.