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.

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

A085453 Numbers n such that n^2 and n^3 together use only distinct digits.

Original entry on oeis.org

2, 3, 8, 9, 24, 69
Offset: 1

Views

Author

Zak Seidov, Jul 01 2003

Keywords

Comments

There are only six such numbers (in base 10). Numbers with distinct digits in A010784. Primes with distinct digits in A029743. The case n and n^2 (exactly 22 numbers) in A059930. The case n and prime[n] (exactly 101 numbers) in A085451.

Examples

			69 is (the last) term because 69^2=4761 and 69^3=328509 together use all 10 distinct digits.
		

Crossrefs

Programs

  • Mathematica
    bb = {}; Do[idpn = IntegerDigits[n^3]; idn = IntegerDigits[n^2]; If[Length[idn] + Length[idpn] == Length[Union[idn, idpn]], bb = {bb, n}], {n, 1, 10000}]; Flatten[bb]
Showing 1-2 of 2 results.