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-10 of 11 results. Next

A061345 Powers of odd primes. Alternatively, 1 and the odd prime powers (p^k, p an odd prime, k >= 1).

Original entry on oeis.org

1, 3, 5, 7, 9, 11, 13, 17, 19, 23, 25, 27, 29, 31, 37, 41, 43, 47, 49, 53, 59, 61, 67, 71, 73, 79, 81, 83, 89, 97, 101, 103, 107, 109, 113, 121, 125, 127, 131, 137, 139, 149, 151, 157, 163, 167, 169, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239
Offset: 0

Views

Author

N. J. A. Sloane, Jun 08 2001

Keywords

Comments

Let a(n)=p^e, then tau(a(n)^2) = tau(p^(2*e)) = 2*e+1 = 2*(e+1)-1 = tau(2*a(n))-1 where tau=A000005. - Juri-Stepan Gerasimov, Jul 14 2011
For n > 0, also the allowed indices of a Cossidente-Penttila graph. - Eric W. Weisstein, Feb 24 2025

Crossrefs

Programs

  • Magma
    [1] cat [n: n in [3..300 by 2] | IsPrimePower(n)]; // Bruno Berselli, Feb 25 2016
    
  • Maple
    select(t -> nops(ifactors(t)[2])<=1, [seq(2*i+1,i=0..1000)]); # Robert Israel, Jun 11 2014
    # alternative:
    A061345 := proc(n)
        option remember;
        local k ;
        if n = 0 then
            1;
        else
            for k from procname(n-1)+2 by 2 do
                if nops(numtheory[factorset](k)) = 1 then
                    return k ;
                end if;
            end do:
        end if;
    end proc: # R. J. Mathar, Jun 25 2016
    isOddPrimepower := n -> type(n, 'primepower') and not type(n, 'even'):
    A061345List := up_to -> select(isOddPrimepower, [`$`(1..up_to)]):
    A061345List(240); # Peter Luschny, Feb 02 2023
  • Mathematica
    t={1};k=0;Do[If[k==1,AppendTo[t,a1]];k=0;Do[c=Sqrt[a^2+b^2];If[IntegerQ[c]&&GCD[a,b,c]==1,k++;a1=a;b1=b;c1=c;],{b,4,a^2/2,2}],{a,3,260,2}];t (* Vladimir Joseph Stephan Orlovsky, Jan 29 2012 *)
    Select[2 Range@ 130 - 1, PrimeNu@# < 2 &] (* Robert G. Wilson v, Jun 12 2014 *)
    Join[{1}, Select[Range[1, 200, 2], PrimePowerQ]] (* Eric W. Weisstein, Feb 23 2025 *)
  • PARI
    is(n)=my(p); if(isprimepower(n,&p), p>2, n==1) \\ Charles R Greathouse IV, Jun 08 2016
    
  • Python
    from sympy import primepi, integer_nthroot
    def A061345(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            kmin = kmax >> 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def f(x): return int(n+x-sum(primepi(integer_nthroot(x,k)[0])-1 for k in range(1,x.bit_length())))
        return bisection(f,n+1,n+1) # Chai Wah Wu, Feb 03 2025

Formula

a(n) = A061344(n)-1.
Intersection of A000961 (prime powers) and A005408 (odd numbers). - Robert Israel, Jun 11 2014

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Jun 12 2001

A045532 Concatenate n with n-th prime.

Original entry on oeis.org

12, 23, 35, 47, 511, 613, 717, 819, 923, 1029, 1131, 1237, 1341, 1443, 1547, 1653, 1759, 1861, 1967, 2071, 2173, 2279, 2383, 2489, 2597, 26101, 27103, 28107, 29109, 30113, 31127, 32131, 33137, 34139, 35149, 36151, 37157, 38163, 39167, 40173, 41179, 42181
Offset: 1

Views

Author

Keywords

Comments

Triangular numbers are 1653, 32131, 79401, ... - Ali Adams, Feb 04 2020
The next such terms are 173340627863131 and 1454987833022905581. - Giovanni Resta, Feb 04 2020

Crossrefs

Cf. A085451. [Reinhard Zumkeller, Jun 30 2010]

Programs

  • Haskell
    a045532 n = read $ show n ++ show (a000040 n) :: Integer
    -- Reinhard Zumkeller, Jul 08 2014
    
  • Magma
    [Seqint(Intseq(NthPrime(n)) cat Intseq(n)): n in [1..45]]; // Vincenzo Librandi, Apr 13 2019
    
  • Mathematica
    Table[FromDigits[Join[IntegerDigits[n], IntegerDigits[Prime[n]]]], {n, 40}] (* Vincenzo Librandi, Apr 13 2019 *)
    #[[1]]*10^IntegerLength[#[[2]]]+#[[2]]&/@Table[{n,Prime[n]},{n,50}] (* Harvey P. Dale, Oct 11 2024 *)
  • PARI
    a(n) = eval(Str(n,prime(n))); \\ Michel Marcus, Apr 13 2019, simplified by M. F. Hasler, Feb 05 2020
    
  • Python
    from sympy import prime
    def a(n): return int(str(n) + str(prime(n)))
    print([a(n) for n in range(1, 43)]) # Michael S. Branicky, Dec 23 2021

Formula

a(n) = n*10^(A004216(A000040(n))+1) + A000040(n). - Reinhard Zumkeller, Sep 03 2002

A084669 Primes which are a concatenation of prime(n) and n.

Original entry on oeis.org

53, 239, 6719, 7321, 15737, 30763, 38977, 41981, 44987, 587107, 661121, 751133, 1051177, 1229201, 1297211, 1303213, 1327217, 1823281, 1913293, 1999303, 2131321, 2179327, 2207329, 2239333, 2371351, 2689391, 2699393, 3067439
Offset: 1

Views

Author

Zak Seidov, Jun 29 2003

Keywords

Examples

			a(2)=239 because prime[9]=23 and concatenation of 23 and 9 is 239 which is prime.
		

Crossrefs

Cf. A084667.
Subsequence of primes of A075110.

Programs

  • Magma
    [p: n in [1..500] | IsPrime(p) where p is Seqint(Intseq(n) cat Intseq(NthPrime(n)))]; // Bruno Berselli, Sep 15 2015
  • Mathematica
    Select[Table[FromDigits[Flatten[{IntegerDigits[Prime[n]], IntegerDigits[n]}]], {n, 1, 500}], PrimeQ]

A138821 Concatenation of n-th Fibonacci number and n-th prime.

Original entry on oeis.org

12, 13, 25, 37, 511, 813, 1317, 2119, 3423, 5529, 8931, 14437, 23341, 37743, 61047, 98753, 159759, 258461, 418167, 676571, 1094673, 1771179, 2865783, 4636889, 7502597, 121393101, 196418103, 317811107, 514229109, 832040113, 1346269127
Offset: 1

Views

Author

Omar E. Pol, Apr 05 2008, Apr 07 2008

Keywords

Examples

			a(10)=5529 because A000045(10)=55 and A000040(10)=29.
		

Crossrefs

Programs

  • Magma
    [Seqint(Intseq(NthPrime(n)) cat Intseq(Fibonacci(n))): n in [1..50]]; // Vincenzo Librandi, Jul 24 2019
  • Maple
    f:= proc(n) local p;
      p:= ithprime(n);
      combinat:-fibonacci(n)*10^(1+ilog10(p))+p
    end proc:
    seq(f(n),n=1..100); # Robert Israel, Dec 15 2014
  • Mathematica
    With[{nn=40},FromDigits[Flatten[IntegerDigits/@#]]&/@ Thread[ {Fibonacci[ Range[nn]],Prime[Range[nn]]}]] (* Harvey P. Dale, Dec 23 2011 *)

A138822 Concatenation of n-th prime and n-th Fibonacci number.

Original entry on oeis.org

21, 31, 52, 73, 115, 138, 1713, 1921, 2334, 2955, 3189, 37144, 41233, 43377, 47610, 53987, 591597, 612584, 674181, 716765, 7310946, 7917711, 8328657, 8946368, 9775025, 101121393, 103196418, 107317811, 109514229, 113832040, 1271346269
Offset: 1

Views

Author

Omar E. Pol, Apr 05 2008

Keywords

Examples

			a(10)=2955 because A000040(10)=29 and A000045(10)=55.
		

Crossrefs

Programs

  • Magma
    [Seqint(Intseq(Fibonacci(n)) cat Intseq(NthPrime(n))): n in [1..50]]; // Vincenzo Librandi, Jul 24 2019
  • Mathematica
    With[{nn=50},FromDigits[Flatten[IntegerDigits[#]]]&/@Thread[ {Prime[ Range[ nn]],Fibonacci[Range[nn]]}]] (* Harvey P. Dale, Jul 12 2014 *)

A084670 Numbers k such that concatenation of prime(k) and k is prime.

Original entry on oeis.org

3, 9, 19, 21, 37, 63, 77, 81, 87, 107, 121, 133, 177, 201, 211, 213, 217, 281, 293, 303, 321, 327, 329, 333, 351, 391, 393, 439, 481, 503, 507, 519, 543, 547, 551, 561, 579, 581, 599, 621, 639, 657, 663, 667, 711, 721, 727, 743, 793, 813, 819, 827, 829, 831, 837
Offset: 1

Views

Author

Zak Seidov, Jun 29 2003

Keywords

Examples

			9 is a term because prime(9) = 23 and concatenation of 23 and 9 is prime
		

Crossrefs

Programs

  • Mathematica
    Select[Range[1000],PrimeQ[Prime[#]10^IntegerLength[#]+#]&] (* Harvey P. Dale, Apr 09 2022 *)
  • PARI
    is(k) = ispseudoprime(eval(Str(prime(k), k))); \\ Jinyuan Wang, Apr 10 2020
    
  • Python
    from sympy import isprime, prime
    def aupto(lim):
      return [k for k in range(1, lim+1) if isprime(int(str(prime(k))+str(k)))]
    print(aupto(837)) # Michael S. Branicky, Mar 09 2021

Extensions

More terms from Jinyuan Wang, Apr 10 2020

A139114 Concatenation of n-th Fibonacci number and n.

Original entry on oeis.org

11, 12, 23, 34, 55, 86, 137, 218, 349, 5510, 8911, 14412, 23313, 37714, 61015, 98716, 159717, 258418, 418119, 676520, 1094621, 1771122, 2865723, 4636824, 7502525, 12139326, 19641827, 31781128, 51422929, 83204030, 134626931, 217830932
Offset: 1

Views

Author

Omar E. Pol, Apr 09 2008

Keywords

Crossrefs

Programs

  • Mathematica
    #[[1]]*10^IntegerLength[#[[2]]]+#[[2]]&/@Table[{Fibonacci[n],n},{n,40}] (* Harvey P. Dale, Nov 03 2016 *)

A253910 Concatenation of n-th prime and n-th nonprime.

Original entry on oeis.org

21, 34, 56, 78, 119, 1310, 1712, 1914, 2315, 2916, 3118, 3720, 4121, 4322, 4724, 5325, 5926, 6127, 6728, 7130, 7332, 7933, 8334, 8935, 9736, 10138, 10339, 10740, 10942, 11344, 12745, 13146, 13748, 13949, 14950, 15151, 15752, 16354, 16755, 17356, 17957, 18158, 19160, 19362, 19763, 19964, 21165, 22366, 22768, 22969
Offset: 1

Views

Author

Omar E. Pol, Feb 06 2015

Keywords

Comments

Concatenate A000040(n) and A018252(n).

Examples

			a(5) = 119 because the 5th prime is 11 and the 5th nonprime is 9.
		

Crossrefs

Programs

  • Haskell
    import Data.Function (on)
    a253911 n = a253911_list !! (n-1)
    a253911_list = map read $
       zipWith ((++) `on` show) a018252_list a000040_list :: [Integer]
    -- Reinhard Zumkeller, Feb 09 2015
  • PARI
    nprime(n)=c=0;k=1;while(k,if(!isprime(k),c++);if(c==n,return(k));k++)
    vector(50,n,eval(concat(Str(prime(n)),Str(nprime(n))))) \\ Derek Orr, Feb 06 2015
    

A253911 Concatenation of n-th nonprime and n-th prime.

Original entry on oeis.org

12, 43, 65, 87, 911, 1013, 1217, 1419, 1523, 1629, 1831, 2037, 2141, 2243, 2447, 2553, 2659, 2761, 2867, 3071, 3273, 3379, 3483, 3589, 3697, 38101, 39103, 40107, 42109, 44113, 45127, 46131, 48137, 49139, 50149, 51151, 52157, 54163, 55167, 56173, 57179, 58181, 60191, 62193, 63197, 64199, 65211, 66223, 68227, 69229
Offset: 1

Views

Author

Omar E. Pol, Feb 06 2015

Keywords

Comments

Concatenate A018252(n) and A000040(n).

Examples

			a(5) = 911 because the 5th nonprime is 9 and the 5th prime is 11.
		

Crossrefs

Programs

  • Haskell
    import Data.Function (on)
    a253911 n = a253911_list !! (n-1)
    a253911_list = map read $
       zipWith ((++) `on` show) a018252_list a000040_list :: [Integer]
    -- Reinhard Zumkeller, Feb 09 2015
  • Mathematica
    cncat[{a_,b_}]:=FromDigits[Flatten[IntegerDigits/@{a,b}]]; Module[ {nn=100,np,len},np = Select[Range[nn],!PrimeQ[#]&];len=Length[np];cncat/@Thread[{np,Prime[Range[len]]}]] (* Harvey P. Dale, Oct 17 2020 *)
  • PARI
    nprime(n)=c=0; k=1; while(k, if(!isprime(k), c++); if(c==n, return(k)); k++)
    vector(50, n, eval(concat(Str(nprime(n)), Str(prime(n))))) \\ Derek Orr, Feb 06 2015
    

A139113 Concatenation of n and n-th Fibonacci number.

Original entry on oeis.org

11, 21, 32, 43, 55, 68, 713, 821, 934, 1055, 1189, 12144, 13233, 14377, 15610, 16987, 171597, 182584, 194181, 206765, 2110946, 2217711, 2328657, 2446368, 2575025, 26121393, 27196418, 28317811, 29514229, 30832040, 311346269, 322178309
Offset: 1

Views

Author

Omar E. Pol, Apr 09 2008

Keywords

Crossrefs

Programs

  • Mathematica
    Table[FromDigits[Join[IntegerDigits[n],IntegerDigits[Fibonacci[n]]]],{n,40}] (* Harvey P. Dale, Dec 31 2015 *)
Showing 1-10 of 11 results. Next