login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A226221 Numbers n such that 2^n mod n is not a power of 2. 2
1, 2, 4, 8, 16, 18, 25, 27, 32, 35, 36, 42, 45, 49, 50, 54, 55, 64, 70, 75, 77, 81, 88, 91, 95, 98, 99, 100, 104, 105, 108, 110, 115, 117, 119, 121, 125, 128, 130, 135, 136, 140, 143, 147, 150, 152, 153, 155, 156, 160, 161, 162, 169, 171, 175, 180, 184, 187, 189, 190, 198, 200 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

All terms beyond the first two are composite: this is a subsequence of A065090.

LINKS

Charles R Greathouse IV, Table of n, a(n) for n = 1..10000

EXAMPLE

2^18 = 262144 = 10 mod 18 and 10 is not a power of 2, so 18 is in the sequence.

MAPLE

isA226221 := proc(n)

    local m ;

    if n <= 2 then

        return true;

    end if;

    m := A015910(n) ;

    if type(m, 'odd') or m = 0 then

        true;

    elif nops(numtheory[factorset](m))  >1 then

        true;

    else

        false;

    end if;

end proc:

A226221 := proc(n)

    local a;

    if n <= 2 then

        n;

    else

        for a from procname(n-1)+1 do

            if isA226221(a) then

                return a;

            end if;

        end do:

    end if;

end proc:

seq(A226221(n), n=1..30) ; # R. J. Mathar, Jun 06 2013

PROG

(PARI) ispow2(n)=n>0 && n==1<<valuation(n, 2)

is(n)=!ispow2(lift(Mod(2, n)^n))

CROSSREFS

Cf. A015910, A015911.

Sequence in context: A127066 A331382 A154362 * A072462 A088827 A316900

Adjacent sequences:  A226218 A226219 A226220 * A226222 A226223 A226224

KEYWORD

nonn

AUTHOR

J. M. Bergot and Charles R Greathouse IV, May 31 2013

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 10 16:16 EDT 2021. Contains 342845 sequences. (Running on oeis4.)