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.

A180547 Primes that become a different prime under the mapping 4 <=> 6.

Original entry on oeis.org

41, 47, 61, 67, 347, 367, 401, 419, 431, 461, 463, 467, 491, 601, 619, 631, 641, 643, 647, 691, 947, 967, 1049, 1069, 1409, 1427, 1447, 1493, 1499, 1609, 1627, 1667, 1693, 1699, 1847, 1867, 2141, 2161, 2417, 2459, 2467, 2477, 2617, 2647, 2659, 2677, 3041
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, 4] || MemberQ[id, 6]) && PrimeQ[ FromDigits[ id /. {4 -> 6, 6 -> 4}] ]]; Select[ Prime@ Range@ 440, fQ]
    dpQ[n_]:=(DigitCount[n,10,4]>0 || DigitCount[n,10,6]>0)&&PrimeQ[ FromDigits[ IntegerDigits[n]/.{4->a,6->b}/.{a->6,b->4}]]; Select[ Prime[ Range[500]],dpQ](* Harvey P. Dale, Feb 28 2022 *)

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

Original entry on oeis.org

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

Views

Author

M. F. Hasler, Feb 13 2013

Keywords

Comments

The map which is applied to primes in A171032.

Crossrefs

Programs

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