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.

Previous Showing 11-12 of 12 results.

A341090 Fully multiplicative: for any prime p, if the reversal of p in base 10, say q, is prime, then a(p) = q, otherwise a(p) = p.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 31, 14, 15, 16, 71, 18, 19, 20, 21, 22, 23, 24, 25, 62, 27, 28, 29, 30, 13, 32, 33, 142, 35, 36, 73, 38, 93, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 213, 124, 53, 54, 55, 56, 57, 58, 59, 60, 61, 26, 63, 64, 155, 66
Offset: 1

Views

Author

Rémy Sigrist, Feb 13 2022

Keywords

Comments

This sequence is a self-inverse permutation of the natural numbers.

Examples

			For n = 377:
- 377 = 13 * 29,
- the reversal of 13, 31, is prime,
- the reversal of 29, 92, is not prime,
- so a(377) = 31 * 29 = 899.
		

Crossrefs

Programs

  • Maple
    R:= n-> (s-> parse(cat(s[-i]$i=1..length(s))))(""||n):
    a:= proc(n) option remember; mul((q->
         `if`(isprime(q), q, j[1]))(R(j[1]))^j[2], j=ifactors(n)[2])
        end:
    seq(a(n), n=1..66);  # Alois P. Heinz, Feb 15 2022
  • Mathematica
    f[p_, e_] := If[PrimeQ[(q = IntegerReverse[p])], q, p]^e; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Feb 15 2022 *)
  • PARI
    a(n) = { my (f=factor(n)); prod (k=1, #f~, my (p=f[k,1], e=f[k,2], q=fromdigits(Vecrev(digits(p)))); if (isprime(q), q, p)^e) }

A257842 Semiprimes p*q such that R(p*q) = R(p)*R(q), where R = A004086 = reverse digits.

Original entry on oeis.org

4, 6, 9, 22, 26, 33, 39, 46, 55, 62, 69, 77, 82, 86, 93, 121, 143, 169, 187, 202, 206, 226, 253, 262, 299, 303, 309, 339, 341, 393, 422, 446, 451, 466, 473, 482, 505, 583, 622, 626, 633, 662, 669, 671, 699, 707, 781, 802, 842, 862, 866, 886, 933, 939, 961
Offset: 1

Views

Author

M. F. Hasler, May 11 2015

Keywords

Comments

A subsequence of A161600. Almost all terms with less than 4 digits are either multiples of 2 or 3 or of 11.

Crossrefs

Programs

  • Maple
    N:= 1000: # to get all terms <= N
    digrev:= proc(n) local L,i;
    L:= convert(n,base,10);
    add(L[-i]*10^(i-1),i=1..nops(L))
    end proc:
    F:= proc(p,q) if digrev(p*q)=digrev(p)*digrev(q) then p*q else NULL fi end proc:
    sort([seq(seq(F(Primes[i],q), q = select(`<=`,Primes[i..-1],N/Primes[i])), i=1..nops(Primes))]); # Robert Israel, May 14 2015
  • Mathematica
    f[n_]:=FactorInteger[n][[1,1]];g[n_]:=FromDigits[Reverse[IntegerDigits[n]]];Select[Range@1000,PrimeOmega[#]==2&&g[f[#]*#/f[#]]==g[f[#]]*g[#/f[#]]&] (* Ivan N. Ianakiev, May 14 2015 *)
  • PARI
    is(n)=bigomega(n)==2&&!eval(concat(Vecrev(Str(n"-"vecmin(n=factor(n)[,1])"*"vecmax(n)))))
Previous Showing 11-12 of 12 results.