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.

A181603 Twin primes ending in 1.

Original entry on oeis.org

11, 31, 41, 61, 71, 101, 151, 181, 191, 241, 271, 281, 311, 421, 431, 461, 521, 571, 601, 641, 661, 811, 821, 881, 1021, 1031, 1051, 1061, 1091, 1151, 1231, 1291, 1301, 1321, 1451, 1481, 1621, 1721, 1871, 1931, 1951, 2081, 2111, 2131, 2141, 2311, 2341, 2381
Offset: 1

Views

Author

Omar E. Pol, Nov 01 2010

Keywords

Comments

These are twin primes == 1 (mod 30) or == 11 (mod 30) or == 21 (mod 30). In the first case they cannot be lower twin primes because the upper ones would be == 3 (mod 30) and divisible by 3. In the second case they cannot be upper twin primes because the lower ones would be == 9 (mod 30) and divisible by 3. The last case is excluded because that implies they are divisible by 3. In summary the upper twin primes in here are given by A282326, the lower twin primes in here by A282321. - R. J. Mathar, Feb 14 2017

Crossrefs

Programs

  • Maple
    isA181603 := proc(p)
        if isprime(p) and (isprime(p-2) or isprime(p+2)) then
            if modp(p,10) = 1 then
                true;
            else
                false;
            end if ;
        else
            false;
        end if;
    end proc:
    for n from 1 to 1000 do
        if isA181603(n) then
            printf("%d,",n) ;
        end if;
    end do: # R. J. Mathar, Feb 14 2017
  • Mathematica
    Select[Prime@ Range@ 360, Mod[ #, 10] == 1 && (PrimeQ[ # - 2] || PrimeQ[ # + 2]) &] (* Robert G. Wilson v, Nov 06 2010 *)
    Select[Flatten[Select[Partition[Prime[Range[400]],2,1],#[[2]]-#[[1]] == 2&]],Mod[#,10]==1&] (* Harvey P. Dale, Oct 24 2021 *)

Extensions

More terms from Robert G. Wilson v, Nov 06 2010