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

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

A122711 Even numbers n such that n+2 divides n+2^n.

Original entry on oeis.org

106976, 1642796, 21879936, 96593696, 6926872352, 21235295216, 24936246176, 25867010016, 80832867116, 82230049056, 208329074876, 360598467776, 533800559216, 587627376176, 661575990912, 662312961696, 664490433776, 737374205276, 831623487276, 1052816473676, 1137732817376, 1213045642656, 1270015920636
Offset: 1

Views

Author

Zak Seidov, Sep 23 2006

Keywords

Comments

Same as even numbers n such that 2^n == 2 (mod n+2). - Robert G. Wilson v, Sep 27 2006
n must be a multiple of 4. A002326(n/4) must not be divisible by 2 or 3. If p is an odd prime factor of n+2, (n+2)/p mod A002326((p-1)/2)=3. - Martin Fuller, Oct 09 2006
Also, the positive numbers A015922(k)-2 that are multiples of 4. E.g., a(1) = 106976 = A015922(3926)-2. Hence, a(n)+2 forms a subsequence of A015922 (and of A130134) consisting of the terms congruent to 2 modulo 4. - Max Alekseyev, Apr 03 2014

Crossrefs

Programs

  • Mathematica
    Do[ If[ PowerMod[2, 2n, 2n + 2] == 2, Print@2n], {n, 10^9}] (* Robert G. Wilson v, Sep 27 2006 *)

Extensions

More terms from Max Alekseyev, Sep 23 2006, Oct 01 2006
More terms from Martin Fuller, Oct 09 2006
Terms a(18) onward from Max Alekseyev, Apr 09 2014
b-file corrected by Max Alekseyev, Oct 11 2016

A252606 Numbers j such that j + 2 divides 2^j + 2.

Original entry on oeis.org

3, 4, 16, 196, 2836, 4551, 5956, 25936, 46775, 65536, 82503, 540736, 598816, 797476, 1151536, 3704416, 4290771, 4492203, 4976427, 8095984, 11272276, 13362420, 21235696, 21537831, 21549347, 29640832, 31084096, 42913396, 49960912, 51127259, 55137316, 56786087, 60296571, 70254724, 70836676
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Mar 03 2015

Keywords

Comments

Numbers j such that (2^j + 2)/(j + 2) is an integer. Numbers j such that (2^j - j)/(j + 2) is an integer.
From Robert Israel, Apr 09 2015: (Start)
The even members of this sequence (4, 16, 196, 2836, ...) are the numbers 2*k-2 where k>=3 is odd and 4^k == -8 (mod k).
The odd members of this sequence (3, 4551, 46775, 82503, ...) are the numbers k-2 where k>=3 is odd and 2^k == -8 (mod k). (End)
2^m is in this sequence for m = (2, 4, 16, 36, 120, 256, 456, 1296, 2556, ...), with the subsequence m = 2^k, k = (1, 2, 4, 8, 16, ...). - M. F. Hasler, Apr 09 2015

Examples

			3 is in this sequence because (2^3 + 2)/(3 + 2) = 2.
		

Crossrefs

Programs

  • Magma
    [n: n in [0..1200000] | Denominator((2^n+2)/(n+2)) eq 1];
    
  • Maple
    select(t -> 2 &^t + 2 mod (t + 2) = 0, [$1..10^6]); # Robert Israel, Apr 09 2015
  • Mathematica
    Select[Range[10^6],IntegerQ[(2^#+2)/(#+2)]&] (* Ivan N. Ianakiev, Apr 17 2015 *)
  • PARI
    for(n=1,10^5,if((2^n+2)%(n+2)==0,print1(n,", "))) \\ Derek Orr, Apr 05 2015
    
  • PARI
    is(n)=Mod(2,n+2)^n==-2 \\ M. F. Hasler, Apr 09 2015
    
  • Python
    A252606_list = [n for n in range(10**4) if pow(2, n, n+2) == n] # Chai Wah Wu, Apr 16 2015

Extensions

a(17)-a(22) from Tom Edgar, Mar 03 2015
More terms from Chai Wah Wu, Apr 16 2015

A122042 Numbers n such that (2^n+n)/(n+2) is prime.

Original entry on oeis.org

13, 19, 55, 469, 3385
Offset: 1

Views

Author

Zak Seidov, Sep 14 2006

Keywords

Comments

All terms are also in A081765 = numbers n such that n+2 divides 2^(n-1)-1.

Crossrefs

Cf. A081765.

Programs

  • Mathematica
    Do[If[PrimeQ[(2^n+n)/(n+2)],Print[n]],{n,1,5000}]
  • PARI
    is(n)=ispseudoprime((2^n+n)/(n+2)) \\ Charles R Greathouse IV, Jun 13 2017

Extensions

a(5) from Alexander Adamchuk, Sep 17 2006

A271267 Even numbers k such that k + 2 divides k^k + 2.

Original entry on oeis.org

4, 16, 196, 2836, 5956, 25936, 65536, 540736, 598816, 797476, 1151536, 3704416, 8095984, 11272276, 13362420, 21235696, 29640832, 31084096, 42913396, 49960912, 55137316, 70254724, 70836676, 81158416, 94618996, 111849956, 129275056, 150026176, 168267856, 169242676, 189796420, 192226516, 198464176, 208232116, 244553296, 246605776, 300018016, 318143296
Offset: 1

Views

Author

Altug Alkan, Apr 03 2016

Keywords

Comments

In other words, even numbers k such that k + 2 divides A014566(k) + 1.
Even terms of A213382.
4, 16, 65536 are the numbers of the form 2^(2^(2^k)), for k >= 0. Are there other members of this sequence with the form of 2^(2^(2^k))?
2^(2^(2^3)) and 2^(2^(2^4)) are terms. - Michael S. Branicky, Apr 16 2021

Examples

			4 is a term because 4 + 2 = 6 divides 4^4 + 2 = 258.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[2, 10^4, 2], Divisible[#^# + 2, # + 2] &] (* Michael De Vlieger, Apr 03 2016 *)
  • PARI
    lista(nn) = forstep(n=2, nn, 2, if( Mod(n, n+2)^n == -2 , print1(n, ", "))); \\ Joerg Arndt, Apr 03 2016
    
  • Python
    def afind(limit):
      k = 2
      while k < limit:
        if (pow(k, k, k+2) + 2)%(k+2) == 0: print(k, end=", ")
        k += 2
    afind(10**7) # Michael S. Branicky, Apr 16 2021
Showing 1-5 of 5 results.