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.

A245319 Numbers k that divide 2^k + 8.

Original entry on oeis.org

1, 2, 4, 5, 6, 8, 12, 18, 24, 36, 72, 88, 198, 228, 1032, 2412, 2838, 4553, 5958, 10008, 24588, 25938, 46777, 65538, 75468, 82505, 130056, 143916, 200364, 540738, 598818, 750852, 797478, 923628, 958212, 1151538, 1250568, 1505388, 1647396, 2365128, 2964036, 3490028, 3704418, 3844808
Offset: 1

Views

Author

Derek Orr, Jul 17 2014

Keywords

Examples

			2^4 + 8 = 24 is divisible by 4. Thus 4 is a term of this sequence.
2^5 + 8 = 40 is divisible by 5. Thus 5 is a term of this sequence.
		

Crossrefs

The odd terms form A357125.
Cf. A015922.

Programs

  • Maple
    select(n -> 2 &^ n + 8 mod n = 0, [$1..10^6]); # Robert Israel, Jul 18 2014
  • Mathematica
    Join[Select[Range[7],Divisible[2^#+8,#]&],Select[Range[4000000], Abs[ PowerMod[ 2,#,#]-#]==8&]] (* Harvey P. Dale, May 25 2016 *)
  • PARI
    for(n=1,10^9,if(Mod(2,n)^n==Mod(-8,n),print1(n,", ")));

A251603 Numbers k such that k + 2 divides k^k - 2.

Original entry on oeis.org

3, 4551, 46775, 82503, 106976, 1642796, 4290771, 4492203, 4976427, 21537831, 21549347, 21879936, 51127259, 56786087, 60296571, 80837771, 87761787, 94424463, 96593696, 138644871, 168864999, 221395539, 255881451, 297460451, 305198247, 360306363, 562654203
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Dec 05 2014

Keywords

Comments

Numbers k such that (k^k - 2)/(k + 2) is an integer.
Since k == -2 (mod k+2), also numbers k such that k + 2 divides (-2)^k - 2. - Robert Israel, Jan 04 2015
Numbers k == 0 (mod 4) such that A066602(k/2+1) = 8, and odd numbers k such that k = 3 or A082493(k+2) = 8. - Robert Israel, Apr 08 2015

Examples

			3 is in this sequence because 3 + 2 = 5 divides 3^3 - 2 = 25.
		

Crossrefs

Programs

  • Magma
    [n: n in [0..10000] | Denominator((n^n-2)/(n+2)) eq 1];
    
  • Maple
    isA251603 := proc(n)
        if modp(n &^ n-2,n+2) = 0 then
            true;
        else
            false;
        end if;
    end proc:
    A251603 := proc(n)
        option remember;
        local a;
        if n = 1 then
            3;
        else
            for a from procname(n-1)+1 do
                if isA251603(a) then
                    return a;
                end if;
            end do:
        end if;
    end proc: # R. J. Mathar, Jan 09 2015
  • Mathematica
    Select[Range[10^6], Mod[PowerMod[#, #, # + 2] - 2, # + 2] == 0 &] (* Michael De Vlieger, Dec 20 2014, based on Robert G. Wilson v at A252041 *)
  • PARI
    for(n=1,10^9,if(Mod(n,n+2)^n==+2,print1(n,", "))); \\ Joerg Arndt, Dec 06 2014
    
  • Python
    A251603_list = [n for n in range(1,10**6) if pow(n, n, n+2) == 2] # Chai Wah Wu, Apr 13 2015

Formula

The even terms form A122711, the odd terms are those in A245319 (forming A357125) decreased by 2. - Max Alekseyev, Sep 22 2016

Extensions

a(6)-a(27) from Joerg Arndt, Dec 06 2014
Showing 1-2 of 2 results.