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.

A180549 Primes that become a different prime under the mapping 4 <=> 8.

Original entry on oeis.org

43, 83, 241, 281, 349, 389, 409, 421, 439, 443, 457, 463, 547, 587, 643, 683, 809, 821, 839, 857, 863, 883, 1249, 1289, 1423, 1471, 1487, 1543, 1583, 1747, 1787, 1823, 1847, 1871, 2341, 2381, 2437, 2447, 2647, 2687, 2749, 2789, 2837, 2887, 3049, 3089, 3433
Offset: 1

Views

Author

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

Keywords

Crossrefs

Programs

  • Maple
    filter:= proc(n) local L,Lp,i;
      if not isprime(n) then return false fi;
      L:= convert(n,base,10);
      Lp:= subs({4=8,8=4},L);
      if L = Lp then return false fi;
      isprime(add(Lp[i]*10^(i-1),i=1..nops(L)));
    end proc:
    select(filter, [seq(i,i=3..10000,2)]); # Robert Israel, Nov 27 2019
  • Mathematica
    fQ[n_] := Block[{id = IntegerDigits@n}, (MemberQ[id, 4] || MemberQ[id, 8]) && PrimeQ[ FromDigits[ id /. {4 -> 8, 8 -> 4}] ]]; Select[ Prime@ Range@ 490, fQ]

A222243 In the number n, replace all (decimal) digits '4' with '8' and vice versa.

Original entry on oeis.org

0, 1, 2, 3, 8, 5, 6, 7, 4, 9, 10, 11, 12, 13, 18, 15, 16, 17, 14, 19, 20, 21, 22, 23, 28, 25, 26, 27, 24, 29, 30, 31, 32, 33, 38, 35, 36, 37, 34, 39, 80, 81, 82, 83, 88, 85, 86, 87, 84, 89, 50, 51, 52, 53, 58, 55, 56, 57, 54, 59, 60, 61, 62, 63, 68, 65, 66, 67, 64, 69, 70, 71, 72, 73, 78, 75
Offset: 0

Views

Author

M. F. Hasler, Feb 13 2013

Keywords

Comments

The map which is applied to primes in A171045.

Crossrefs

Programs

  • Mathematica
    a[n_]:= IntegerDigits[n]/.{4->8, 8->4} // FromDigits; Table[a[n], {n, 0, 80}] (* Vincenzo Librandi, Jul 31 2013 *)
  • PARI
    A222243(n,d=[0, 1, 2, 3, 8, 5, 6, 7, 4, 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.