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-4 of 4 results.

A309809 a(n) is the concatenation of n and 2n+1.

Original entry on oeis.org

13, 25, 37, 49, 511, 613, 715, 817, 919, 1021, 1123, 1225, 1327, 1429, 1531, 1633, 1735, 1837, 1939, 2041, 2143, 2245, 2347, 2449, 2551, 2653, 2755, 2857, 2959, 3061, 3163, 3265, 3367, 3469, 3571, 3673, 3775, 3877, 3979, 4081, 4183, 4285, 4387, 4489, 4591, 4693, 4795, 4897
Offset: 1

Views

Author

Robert Israel, Aug 17 2019

Keywords

Examples

			a(3)=37 is the concatenation of 3 and 7.
		

Crossrefs

Programs

  • Maple
    seq(n*10^(ceil(log[10](2*n+1)))+2*n+1, n=1..100);
  • Mathematica
    Table[FromDigits[Join[IntegerDigits[n],IntegerDigits[2n+1]]],{n,50}] (* Harvey P. Dale, Jan 30 2024 *)

Formula

a(n) = n*10^(ceiling(log_10(2*n+1))) + 2*n + 1.

A309828 Squares formed by concatenating k and 2*k+1.

Original entry on oeis.org

25, 49, 1225, 4489, 112225, 444889, 11122225, 44448889, 816416329, 1111222225, 1451229025, 3832476649, 4444488889, 111112222225, 444444888889, 10185602037121, 11111122222225, 44444448888889, 46355849271169, 997230019944601, 1111111222222225, 1231148024622961
Offset: 1

Views

Author

Marius A. Burtea, Aug 18 2019

Keywords

Comments

The sequence is infinite. The squares of the form 66...67^2 = 4..48..89 are terms.
Another infinite family is the squares 33...35^2 = 1...122...25. - Robert Israel, Aug 20 2019

Examples

			5^2 = 25 = 2_(2 * 2 + 1);
7^2 = 49 = 4_(2 * 4 + 1);
35^2 = 1225 = 12_(2 * 12 + 1);
61907^2 = 3832476649 = 38324_(2 * 38324 + 1).
		

References

  • Ion Cucurezeanu, Perfect squares and cubes of integers, Ed. Gil, Zalău, (2007), ch. 4, p. 25, pr. 211, 212 (in Romanian).

Crossrefs

Programs

  • Magma
    [a:n in [1..30000000]|IsSquare(a) where a is 10^(#Intseq(2*n+1))*n+2*n+1];
    
  • Maple
    F:= proc(m) local x,X,A;
      X:= [numtheory:-rootsunity(2,10^m+2)];
      A:= map(x -> (x^2-1)/(10^m+2), X);
      A:= sort(select(x -> 2*x+1>=10^(m-1) and 2*x+1<10^m, A));
      op(map(x -> x*10^m+2*x+1, A))
    end proc:
    subsop(1=NULL, [seq(F(m),m=1..10)]); # Robert Israel, Aug 20 2019
  • Mathematica
    Select[Array[FromDigits@ Flatten@ IntegerDigits[{#, 2 # + 1}] &, 10^5],
    IntegerQ@ Sqrt@ # &] (* Michael De Vlieger, Aug 19 2019 *)
  • Python
    def Test(n):
        s = str(n)
        ps, ss = s[0:len(s)//2], s[len(s)//2:len(s)]
        return int(ss) == 2*int(ps)+1 and s[len(s)//2] != "0"
    n, a = 1, 4
    while n < 23:
        if Test(a*a):
            print(n,a*a)
            n = n+1
        a = a+1 # A.H.M. Smeets, Aug 19 2019
    
  • Python
    from itertools import count, islice
    from sympy.ntheory.primetest import is_square
    def A309828_gen(): # generator of terms
        return filter(is_square,(int(str(k)+str((k<<1)+1)) for k in count(1)))
    A309828_list = list(islice(A309828_gen(),20)) # Chai Wah Wu, Feb 20 2023

A309851 Primes formed by concatenating n and 2n-1.

Original entry on oeis.org

11, 23, 47, 59, 1019, 1223, 1427, 1733, 2039, 2141, 2243, 2447, 2549, 2753, 2957, 3467, 3671, 4079, 4283, 4691, 4793, 5099, 52103, 55109, 61121, 65129, 70139, 75149, 77153, 82163, 86171, 95189, 102203, 104207, 112223, 119237, 124247, 130259, 132263, 137273, 145289, 146291, 147293, 149297, 150299, 160319
Offset: 1

Views

Author

A.H.M. Smeets, Aug 20 2019

Keywords

Crossrefs

Cf. A000040, A052089 (n and n-1), A030458 (n and n+1), A309808 (n and 2n+1).

Programs

  • Magma
    [a:m in [1..170]|IsPrime(a) where a is 10^(#Intseq(2*m-1))*m+2*m-1]; // Marius A. Burtea, Oct 09 2019
    
  • Mathematica
    f[n_] := FromDigits @ (Join @@ IntegerDigits[{n, 2n-1}]); Select[f /@ Range[160], PrimeQ]  (* Amiram Eldar, Sep 24 2019 *)
  • Python
    from sympy import isprime
    A309851_list = [m for m in (int(str(n)+str(2*n-1)) for n in range(1,10**5)) if isprime(m)] # Chai Wah Wu, Oct 23 2019

A355970 Primes p such that p^2 is the concatenation of x and 2*x+1 for some x.

Original entry on oeis.org

5, 7, 67, 28573, 666667, 31578949, 64912283, 66666667, 666666667, 66666666667, 29083665338647, 31772053083528493, 50819672131147541, 4299928432854102613, 6811594202898550727, 66666666666666666667, 29136816792745854416111, 46823891622677827205227, 66666666666666666666667
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Jul 21 2022

Keywords

Examples

			a(3) = 67 is a term because it is prime and 67^2 = 4489 is the concatenation of 44 and 2*44+1=89.
		

Crossrefs

Contains A093170.

Programs

  • Maple
    dcat:=proc(a,b) a*10^(1+ilog10(b))+b end proc:
    f:= proc(t) local s;
    if not issqr(t) then return NULL fi;
    s:=sqrt(t);
    if isprime(s) then return s fi
    end proc:
    map(f, [seq(dcat(x,2*x+1), x=1..5*10^7)]);

Extensions

More terms from Jinyuan Wang, Jul 21 2022
Showing 1-4 of 4 results.