login
A275797
Primes for which the concatenation of the digits in the even positions and the concatenation of the digits in the odd positions are squares.
1
11, 19, 41, 409, 419, 449, 499, 811, 1061, 1069, 1861, 2459, 2851, 3061, 3469, 4091, 4099, 6449, 6841, 8011, 8419, 10211, 11261, 12251, 12659, 13669, 14699, 16649, 18211, 20809, 20849, 20899, 22859, 23869, 26849, 38611, 42451, 44491, 46441, 52259, 53269, 56249
OFFSET
1,1
LINKS
Jeremiah Bartz, Bruce Dearden, and Joel Iiams, Classes of Gap Balancing Numbers, arXiv:1810.07895 [math.NT], 2018.
Jeremiah Bartz, Bruce Dearden, and Joel Iiams, Counting families of generalized balancing numbers, The Australasian Journal of Combinatorics (2020) Vol. 77, Part 3, 318-325.
EXAMPLE
419 is prime and numbers 49 and 1 are square.
12659 is prime and numbers 169 and 25 are square.
MATHEMATICA
halfQ[n_, k_] := IntegerQ[Sqrt[FromDigits[IntegerDigits[n][[k ;; -1 ;; 2]]]]];
Select[Range[200000], PrimeQ[#] && halfQ[#, 1] && halfQ[#, 2] &] (* Amiram Eldar, Nov 05 2018 *)
PROG
(Perl) use ntheory ':all'; forprimes { my @d = split(//, $_); if (is_square(join('', map { $d[2*$_] } (0..$#d/2))) && is_square(join('', map { $d[2*$_+1] } (0..@d/2-1)))) { print "$_, " } } 10**6; # Daniel Suteu, Dec 03 2018
(PARI) isok(p) = {if (isprime(p), my (d=digits(p)); if (#d > 1, if (#d % 2, lo = #d\2+1; le = #d\2, le = #d\2; lo = #d\2); issquare(fromdigits(vector(le, k, d[2*k]))) && issquare(fromdigits(vector(lo, k, d[2*k-1]))); ); ); } \\ Michel Marcus, Dec 05 2018
CROSSREFS
Sequence in context: A167535 A184328 A260271 * A376338 A294993 A201719
KEYWORD
nonn,base
AUTHOR
Marius A. Burtea, Oct 26 2018
STATUS
approved