A191740
Dispersion of A047220, (numbers >1 and congruent to 0 or 1 or 3 mod 5), by antidiagonals.
Original entry on oeis.org
1, 3, 2, 6, 5, 4, 11, 10, 8, 7, 20, 18, 15, 13, 9, 35, 31, 26, 23, 16, 12, 60, 53, 45, 40, 28, 21, 14, 101, 90, 76, 68, 48, 36, 25, 17, 170, 151, 128, 115, 81, 61, 43, 30, 19, 285, 253, 215, 193, 136, 103, 73, 51, 33, 22, 476, 423, 360, 323, 228, 173, 123
Offset: 1
Northwest corner:
1....3....6....11...20
2....5....10...18...31
4....8....15...26...45
7....13...23...40...68
9....16...28...48...81
12...21...36...61...103
-
(* Program generates the dispersion array t of the increasing sequence f[n] *)
r = 40; r1 = 12; c = 40; c1 = 12;
a=3; b=5; c2=6; m[n_]:=If[Mod[n,3]==0,1,0];
f[n_]:=a*m[n+2]+b*m[n+1]+c2*m[n]+5*Floor[(n-1)/3]
Table[f[n], {n, 1, 30}] (* A047220 *)
mex[list_] := NestWhile[#1 + 1 &, 1, Union[list][[#1]] <= #1 &, 1, Length[Union[list]]]
rows = {NestList[f, 1, c]};
Do[rows = Append[rows, NestList[f, mex[Flatten[rows]], r]], {r}];
t[i_, j_] := rows[[i, j]];
TableForm[Table[t[i, j], {i, 1, 10}, {j, 1, 10}]]
(* A191740 *)
Flatten[Table[t[k, n - k + 1], {n, 1, c1}, {k, 1, n}]] (* A191740 *)
A191741
Dispersion of A047217, (numbers >1 and congruent to 0 or 1 or 2 mod 5), by antidiagonals.
Original entry on oeis.org
1, 2, 3, 5, 6, 4, 10, 11, 7, 8, 17, 20, 12, 15, 9, 30, 35, 21, 26, 16, 13, 51, 60, 36, 45, 27, 22, 14, 86, 101, 61, 76, 46, 37, 25, 18, 145, 170, 102, 127, 77, 62, 42, 31, 19, 242, 285, 171, 212, 130, 105, 71, 52, 32, 23, 405, 476, 286, 355, 217, 176, 120
Offset: 1
Northwest corner:
1....2....5....10...17
3....6....11...20...35
4....7....12...21...36
8....15...26...45...76
9....16...27...46...77
13...22...37...62...105
-
(* Program generates the dispersion array t of the increasing sequence f[n] *)
r = 40; r1 = 12; c = 40; c1 = 12;
a=2; b=5; c2=6; m[n_]:=If[Mod[n,3]==0,1,0];
f[n_]:=a*m[n+2]+b*m[n+1]+c2*m[n]+5*Floor[(n-1)/3]
Table[f[n], {n, 1, 30}] (* A047217 *)
mex[list_] := NestWhile[#1 + 1 &, 1, Union[list][[#1]] <= #1 &, 1, Length[Union[list]]]
rows = {NestList[f, 1, c]};
Do[rows = Append[rows, NestList[f, mex[Flatten[rows]], r]], {r}];
t[i_, j_] := rows[[i, j]];
TableForm[Table[t[i, j], {i, 1, 10}, {j, 1, 10}]] (* A191741 *)
Flatten[Table[t[k, n - k + 1], {n, 1, c1}, {k, 1, n}]] (* A191741 *)
A046831
Numbers k such that decimal expansion of k^2 contains k as a substring and k does not end in 0.
Original entry on oeis.org
1, 5, 6, 25, 76, 376, 625, 3792, 9376, 14651, 90625, 109376, 495475, 505025, 890625, 971582, 1713526, 2890625, 4115964, 5133355, 6933808, 7109376, 10050125, 12890625, 48588526, 50050025, 66952741, 87109376, 88027284, 88819024
Offset: 1
-
a046831 n = a046831_list !! (n-1)
a046831_list = filter ((> 0) . (`mod` 10)) a018834_list
-- Reinhard Zumkeller, Jul 27 2011
-
Reap[For[n = 1, n < 10^8, n++, If[Mod[n, 10] != 0, If[StringPosition[ToString[n^2], ToString[n]] != {}, Print[n]; Sow[n]]]]][[2, 1]] (* Jean-François Alcover, Apr 04 2013 *)
-
from itertools import count, islice
def A046831_gen(startvalue=0): # generator of terms >= startvalue
return filter(lambda n:n%10 and str(n) in str(n**2), count(max(startvalue,0)))
A046831_list = list(islice(A046831_gen(),20)) # Chai Wah Wu, Apr 04 2023
A046851
Numbers n such that n^2 can be obtained from n by inserting internal (but not necessarily contiguous) digits.
Original entry on oeis.org
0, 1, 10, 11, 95, 96, 100, 101, 105, 110, 125, 950, 960, 976, 995, 996, 1000, 1001, 1005, 1006, 1010, 1011, 1021, 1025, 1026, 1036, 1046, 1050, 1100, 1101, 1105, 1201, 1205, 1250, 1276, 1305, 1316, 1376, 1405, 9500, 9505, 9511, 9525, 9600, 9605, 9625
Offset: 1
110^2 = 12100 (insert "2" and "0" into "1_1_0").
-
import Data.List (isInfixOf)
a046851 n = a046851_list !! (n-1)
a046851_list = filter chi a008851_list where
chi n = (x == y && xs `isSub` ys) where
x:xs = show $ div n 10
y:ys = show $ div (n^2) 10
isSub [] ys = True
isSub _ [] = False
isSub us'@(u:us) (v:vs)
| u == v = isSub us vs
| otherwise = isSub us' vs
-- Reinhard Zumkeller, Jul 27 2011
-
IsSublist:= proc(a, b)
local i,bp,j;
bp:= b;
for i from 1 to nops(a) do
j:= ListTools:-Search(a[i],bp);
if j = 0 then return false fi;
bp:= bp[j+1..-1];
od;
true
end proc:
filter:= proc(n) local A,B;
A:= convert(n,base,10);
B:= convert(n^2,base,10);
if not(A[1] = B[1] and A[-1] = B[-1]) then return false fi;
if nops(A) <= 2 then return true fi;
IsSublist(A[2..-2],B[2..-2])
end proc:
select(filter, [$0..10^4]); # Robert Israel, Oct 20 2016
-
id[n_]:=IntegerDigits[n];
insQ[n_]:=First[id[n]]==First[id[n^2]]&&Last[id[n]]==Last[id[n^2]];
sort[n_]:=Flatten/@Table[Position[id[n^2],id[n][[i]]],{i,1,Length[id[n]]}];
takeQ[n_]:=Module[{lst={First[sort[n][[1]]]}},
Do[
Do[
If[Last[lst]Ivan N. Ianakiev, Oct 19 2016 *)
A301567
Expansion of Product_{k>=1} (1 + x^(5*k))*(1 + x^(5*k-4)).
Original entry on oeis.org
1, 1, 0, 0, 0, 1, 2, 1, 0, 0, 1, 3, 2, 0, 0, 2, 5, 4, 1, 0, 2, 7, 7, 2, 0, 3, 10, 11, 4, 0, 4, 14, 17, 8, 1, 5, 19, 25, 13, 2, 6, 25, 36, 21, 4, 8, 33, 50, 33, 8, 10, 43, 69, 49, 14, 13, 55, 93, 71, 23, 17, 70, 124, 102, 37, 22, 88, 163, 142, 57, 30, 110, 212, 195, 85
Offset: 0
a(11) = 3 because we have [11], [10, 1] and [6, 5].
Cf.
A008851,
A035367,
A036820,
A203776,
A219607,
A280454,
A301562,
A301563,
A301564,
A301565,
A301568,
A301569,
A301570.
-
nmax = 74; CoefficientList[Series[Product[(1 + x^(5 k)) (1 + x^(5 k - 4)), {k, 1, nmax}], {x, 0, nmax}], x]
nmax = 74; CoefficientList[Series[x^4 QPochhammer[-1, x^5] QPochhammer[-x^(-4), x^5]/(2 (1 + x^4)), {x, 0, nmax}], x]
nmax = 74; CoefficientList[Series[Product[(1 + Boole[MemberQ[{0, 1}, Mod[k, 5]]] x^k), {k, 1, nmax}], {x, 0, nmax}], x]
A086457
Both n and n^2 have the same initial digit and also n and n^2 have the same final digit when expressed in base 10.
Original entry on oeis.org
0, 1, 10, 11, 95, 96, 100, 101, 105, 106, 110, 111, 115, 116, 120, 121, 125, 126, 130, 131, 135, 136, 140, 141, 895, 896, 950, 951, 955, 956, 960, 961, 965, 966, 970, 971, 975, 976, 980, 981, 985, 986, 990, 991, 995, 996, 1000, 1001, 1005, 1006, 1010, 1011
Offset: 1
a(12) = 115 appears in the sequence because 115*115 = 13225.
-
left$(str$(n), 1) = left$(str$(n^2), 1) AND right$(str$(n), 1) = right$(str$(n^2), 1)
-
a086457 n = a086457_list !! (n-1)
a086457_list = filter (\x -> a000030 x == a000030 (x^2) &&
a010879 x == a010879 (x^2)) [0..]
-- Reinhard Zumkeller, Jul 27 2011
-
ldQ[n_]:=Module[{idn=IntegerDigits[n],idn2=IntegerDigits[n^2]}, First[ idn] == First[idn2]&&Last[idn]==Last[idn2]]; Select[Range[ 0,1100], ldQ] (* Harvey P. Dale, Feb 06 2011 *)
A045953
Numbers m such that m^2 can be obtained from m by inserting an internal block of (contiguous) digits.
Original entry on oeis.org
0, 1, 10, 11, 95, 96, 100, 101, 125, 976, 995, 996, 1000, 1001, 1025, 1376, 9625, 9976, 9995, 9996, 10000, 10001, 10025, 10376, 10625, 99376, 99625, 99976, 99995, 99996, 100000, 100001, 100025, 100376, 100625, 109376, 990625, 999376, 999625, 999976
Offset: 1
John "MazeMan" Knoderer (Webmaster(AT)Mazes.com)
95^2 = 9025 (insert '02' inside '95').
-
import Data.List (isPrefixOf, inits, isSuffixOf, tails)
a045953 n = a045953_list !! (n-1)
a045953_list = filter chi a008851_list where
chi n = (x == y && xs `isSub'` ys) where
x:xs = show $ div n 10
y:ys = show $ div (n^2) 10
isSub' us vs = any id $ zipWith (&&)
(map (`isPrefixOf` vs) $ inits us)
(map (`isSuffixOf` vs) $ tails us)
-- Reinhard Zumkeller, Jul 27 2011
A219190
Numbers of the form k*(5*k+1), where k = 0,-1,1,-2,2,-3,3,...
Original entry on oeis.org
0, 4, 6, 18, 22, 42, 48, 76, 84, 120, 130, 174, 186, 238, 252, 312, 328, 396, 414, 490, 510, 594, 616, 708, 732, 832, 858, 966, 994, 1110, 1140, 1264, 1296, 1428, 1462, 1602, 1638, 1786, 1824, 1980, 2020, 2184, 2226, 2398, 2442, 2622, 2668, 2856, 2904, 3100
Offset: 1
Cf.
A090771: square roots of 20*a(n)+1 (see the first comment).
Cf. similar sequences listed in
A219257.
-
k:=5; f:=func; [0] cat [f(n*m): m in [-1,1], n in [1..25]];
-
I:=[0,4,6,18,22]; [n le 5 select I[n] else Self(n-1)+2*Self(n-2)-2*Self(n-3)-Self(n-4)+Self(n-5): n in [1..50]]; // Vincenzo Librandi, Aug 18 2013
-
Rest[Flatten[{# (5 # - 1), # (5 # + 1)} & /@ Range[0, 25]]]
CoefficientList[Series[2 x (2 + x + 2 x^2) / ((1 + x)^2 (1 - x)^3), {x, 0, 50}], x] (* Vincenzo Librandi, Aug 18 2013 *)
LinearRecurrence[{1,2,-2,-1,1},{0,4,6,18,22},50] (* Harvey P. Dale, Jan 21 2015 *)
A274913
Square array read by antidiagonals upwards in which each new term is the least positive integer distinct from its neighbors.
Original entry on oeis.org
1, 2, 3, 1, 4, 1, 2, 3, 2, 3, 1, 4, 1, 4, 1, 2, 3, 2, 3, 2, 3, 1, 4, 1, 4, 1, 4, 1, 2, 3, 2, 3, 2, 3, 2, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3
Offset: 1
The corner of the square array begins:
1, 3, 1, 3, 1, 3, 1, 3, 1, 3, ...
2, 4, 2, 4, 2, 4, 2, 4, 2, ...
1, 3, 1, 3, 1, 3, 1, 3, ...
2, 4, 2, 4, 2, 4, 2, ...
1, 3, 1, 3, 1, 3, ...
2, 4, 2, 4, 2, ...
1, 3, 1, 3, ...
2, 4, 2, ...
1, 3, ...
2, ...
...
The sequence written as a triangle begins:
1;
2, 3;
1, 4, 1;
2, 3, 2, 3;
1, 4, 1, 4, 1;
2, 3, 2, 3, 2, 3;
1, 4, 1, 4, 1, 4, 1;
2, 3, 2, 3, 2, 3, 2, 3;
1, 4, 1, 4, 1, 4, 1, 4, 1;
2, 3, 2, 3, 2, 3, 2, 3, 2, 3;
...
-
Table[1 + Boole@ EvenQ@ # + 2 Boole@ EvenQ@ k &[n - k + 1], {n, 14}, {k, n}] // Flatten (* Michael De Vlieger, Nov 14 2016 *)
A151972
Numbers that are congruent to {0, 1, 6, 10} mod 15.
Original entry on oeis.org
0, 1, 6, 10, 15, 16, 21, 25, 30, 31, 36, 40, 45, 46, 51, 55, 60, 61, 66, 70, 75, 76, 81, 85, 90, 91, 96, 100, 105, 106, 111, 115, 120, 121, 126, 130, 135, 136, 141, 145, 150, 151, 156, 160, 165, 166, 171, 175, 180, 181, 186, 190, 195, 196, 201, 205, 210, 211, 216, 220, 225
Offset: 1
For m^2 == m (mod n), see: n=2:
A001477, n=3:
A032766, n=4:
A042948, n=5:
A008851, n=6:
A032766, n=7:
A047274, n=8:
A047393, n=9:
A090570, n=10:
A008851, n=11:
A112651, n=12:
A112652, n=13:
A112653, n=14:
A047274, n=15:
A151972, n=16:
A151977, n=17:
A151978, n=18:
A090570, n=19:
A151979, n=20:
A151980, n=21:
A151971, n=22,
A112651, n=24:
A151973, n=26:
A112653, n=30:
A151972, n=32:
A151983, n=34:
A151978, n=38:
A151979, n=42:
A151971, n=48:
A151981, n=64:
A151984.
-
[ n : n in [0..1000] | n mod 15 in [0, 1, 6, 10]]; // Vincenzo Librandi, Apr 02 2011, simplified by Eric M. Schmidt, Aug 05 2012
-
[ n: n in [0..1000] | (n^2-n) mod (15) eq 0 ]; // Vincenzo Librandi, Apr 03 2011, altered by Eric M. Schmidt, Aug 05 2012
-
A151972:=n->(30*n-41-5*I^(2*n)+(3+3*I)*I^(-n)+(3-3*I)*I^n)/8: seq(A151972(n), n=1..100); # Wesley Ivan Hurt, Jun 07 2016
-
Select[Range[0, 300], Divisible[#^2-#, 15]&] (* Harvey P. Dale, Apr 01 2011, altered by Eric M. Schmidt, Aug 05 2012 *)
Comments