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.

A180522 Primes that become a different prime under the mapping 0 <=> 7.

Original entry on oeis.org

73, 103, 109, 173, 179, 409, 479, 701, 709, 719, 743, 761, 773, 1021, 1033, 1303, 1373, 1721, 1733, 1801, 1871, 2011, 2029, 2053, 2089, 2203, 2273, 2711, 2729, 2753, 2789, 3019, 3061, 3079, 3301, 3371, 3709, 3719, 3761, 4021, 4051, 4073, 4093, 4099, 4201
Offset: 1

Views

Author

Zak Seidov and Robert G. Wilson v, Sep 09 2010

Keywords

Crossrefs

Programs

  • Mathematica
    fQ[n_] := Block[{id = IntegerDigits@n}, (MemberQ[id, 0] || MemberQ[id, 7]) && PrimeQ[ FromDigits[ id /. {0 -> 7, 7 -> 0}] ]]; Select[ Prime@ Range@ 600, fQ]

A222216 In the number n, replace all (decimal) digits 0 with 7 and vice versa.

Original entry on oeis.org

7, 1, 2, 3, 4, 5, 6, 0, 8, 9, 17, 11, 12, 13, 14, 15, 16, 10, 18, 19, 27, 21, 22, 23, 24, 25, 26, 20, 28, 29, 37, 31, 32, 33, 34, 35, 36, 30, 38, 39, 47, 41, 42, 43, 44, 45, 46, 40, 48, 49, 57, 51, 52, 53, 54, 55, 56, 50, 58, 59, 67, 61, 62, 63, 64, 65, 66, 60, 68, 69, 7, 1, 2, 3, 4, 5
Offset: 0

Views

Author

M. F. Hasler, Feb 12 2013

Keywords

Comments

The map which is applied to primes in A171034.

Crossrefs

Programs

  • Maple
    A222216 := proc(n)
        if n = 0 then
            7;
        else
            dgs := convert(n,base,10) ;
            dgs := [seq( subs({0=7,7=0},op(d,dgs)),d=1..nops(dgs))] ;
            add(op(d,dgs)*10^(d-1),d=1..nops(dgs)) ;
        end if;
    end proc: # R. J. Mathar, Feb 15 2013
  • Mathematica
    a[n_]:= IntegerDigits[n]/.{0->7, 7->0} // FromDigits; Table[a[n], {n, 0, 80}] (* Vincenzo Librandi, Jul 29 2013 *)
  • PARI
    A222216(n,d=[7,1,2,3,4,5,6,0,8,9])={sum(i=1,#n=digits(n),d[n[i]+1]*10^(#n-i),!n*d[1])} \\ N.B.: digits(0)=[] in PARI (v.2.6)
Showing 1-2 of 2 results.