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.

A084122 Numbers k such that k*prime(k) is a palindrome.

Original entry on oeis.org

1, 2, 5, 12, 16, 3623, 4119, 618725, 708567, 1498739, 2762990591
Offset: 1

Views

Author

Giovanni Resta, May 14 2003

Keywords

Comments

a(12) > 3.7*10^12. - Giovanni Resta, Jun 28 2013

Examples

			4119 is in the sequence since the 4119th prime is 39119 and 4199*39119 = 161131161 is a palindrome.
		

Crossrefs

Programs

  • Maple
    ispal:= proc(n) local L;
      L:= convert(n,base,10);
      L = ListTools:-Reverse(L);
    end proc:
    R:= NULL: count:= 0: p:= 1:
    for k from 1 while count < 11 do
      p:= nextprime(p);
      if ispal(k*p) then R:= R,k; count:= count+1 fi
    od:
    R; # Robert Israel, Feb 22 2023
  • Mathematica
    palQ[n_]:=FromDigits[Reverse[IntegerDigits[n]]]==n; t={}; Do[If[palQ[Prime[n]*n],AppendTo[t,n]],{n,15*10^5}]; t (* Jayanta Basu, May 11 2013 *)
  • PARI
    ispal(n) = my(d=digits(n)); d == Vecrev(d); \\ A002113
    isok(k) = ispal(k*prime(k)) \\ Alexandru Petrescu, Feb 22 2023
    
  • Python
    from sympy import sieve
    def ok(n): return n and (s := str(n*sieve[n])) ==  s[::-1]
    print([k for k in range(10**6) if ok(k)]) # Michael S. Branicky, Feb 22 2023

A084123 Palindromic numbers which are equal to a number n multiplied by the n-th prime.

Original entry on oeis.org

2, 6, 55, 444, 848, 122555221, 161131161, 5729689869275, 7587952597857, 35757255275753, 182196497222794691281
Offset: 1

Views

Author

Giovanni Resta, May 14 2003

Keywords

Comments

a(12) > 4.3*10^26. [Giovanni Resta, Jun 28 2013]

Examples

			The palindrome 161131161 is in the sequence since 39119 is the 4119th prime and 4199*39119 = 161131161.
		

Crossrefs

Programs

  • Mathematica
    palQ[n_]:=FromDigits[Reverse[IntegerDigits[n]]]==n; t={}; Do[If[palQ[x=n*Prime[n]],AppendTo[t,x]],{n,15*10^5}]; t (* Jayanta Basu, May 11 2013 *)
Showing 1-2 of 2 results.