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.

A085324 a(n) is the least exponent so that reverse(n^a(n)) is a prime number. a(n)=0 if no such exponent exists, namely when e.g., n = 3k or n = 11k, k > 1.

Original entry on oeis.org

0, 1, 1, 2, 1, 0, 1, 8, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 2, 1, 0, 0, 8, 0, 13, 47, 0, 2, 7, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 2, 2, 0, 5, 0, 0, 22, 15, 0, 6, 1, 0, 3, 10, 0, 0, 143, 0, 88, 12, 0, 4, 2, 0, 4, 8, 0, 39, 83, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 8, 0, 6, 11, 0, 2, 28, 0, 0, 2, 0, 1, 1, 0, 292, 1, 0, 1, 1
Offset: 1

Views

Author

Labos Elemer, Jul 02 2003

Keywords

Comments

a(k) = 1 for k in A095179. - Michel Marcus, Apr 09 2018

Examples

			For n=46, a(46)=22 means that reversion of 46^22 gives a prime: 6100744433653913942689966672393877083.
		

Crossrefs

Programs

  • Maple
    Rev:= proc(n) local L;
    L:= convert(n,base,10);
    add(L[-i]*10^(i-1),i=1..nops(L))
    end proc:
    f:= proc(n) local k;
      if igcd(n,33) <> 1  then return 0 fi;
      if n mod 10 = 0 then return procname(n/10) fi;
      for k from 1 do if isprime(Rev(n^k)) then return k fi od:
    end proc:
    f(1):= 0: f(3):= 1; f(11):= 1;
    map(f, [$1..100]); # Robert Israel, Apr 09 2018
  • Mathematica
    nd[x_, y_] := 10*x+y; tn[x_] := Fold[nd, 0, x]; bac[x_] := tn[Reverse[IntegerDigits[x]]] t={list without 3k and 11k numbers}; le=Length[t]; Table[f=1; Do[s=bac[Part[t, n]^k]; If[PrimeQ[s]&&Equal[f, 1], Print[{k, Part[t, n], s}]; f=0], {k, 1, 300}], {n, 1, le}]

Formula

a(3k) = a(11k) = 0 for k > 1 because reversion does not make a prime from any of their powers.

A085326 a(n)=p is smallest prime such that rev(p)=n^j with some exponent, or 0 if no such prime exists [when e.g. n=1,n=3k or n=11k, k>1].

Original entry on oeis.org

0, 2, 3, 61, 5, 0, 7, 61277761, 0, 0, 11, 0, 31, 41, 0, 61, 71, 0, 163, 2, 0, 0, 18258901387, 0, 5265674839116110941, 6716872795737314976899264656807717363719079328404119318887571869813, 0
Offset: 1

Views

Author

Labos Elemer, Jul 03 2003

Keywords

Examples

			n=86: a(86)=6505868216024313214870917495263873755562243530151045641,
and rev[86]=86^28.
		

Crossrefs

Showing 1-2 of 2 results.