login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
Search: keyword:new
Displaying 1-10 of 414 results found. page 1 2 3 4 5 6 7 8 9 10 ... 42
     Sort: relevance | references | number | modified | created      Format: long | short | data
A375257 Numbers whose sum of base-2 digits is 1 more than their sum of base-3 digits. +0
0
3, 9, 15, 28, 29, 39, 45, 57, 82, 83, 84, 85, 94, 95, 99, 110, 118, 119, 123, 135, 162, 163, 165, 174, 175, 183, 207, 219, 248, 297, 303, 315, 324, 325, 334, 335, 342, 343, 363, 382, 383, 406, 407, 411, 423, 435, 441, 447, 459, 488, 494, 496, 497, 502, 503, 506, 508, 509, 543, 570, 571, 573, 603 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Numbers k such that A000120(k) = A053735(k) + 1.
LINKS
EXAMPLE
a(3) = 15 is a term because 15 = 1111_2 = 120_3 so A000120(15) = 1+1+1+1 = 4 and A053735(15) = 1+2+0 = 3.
MAPLE
filter:= proc(n) convert(convert(n, base, 2), `+`) = convert(convert(n, base, 3), `+`)+1 end proc:
select(filter, [$1..1000]);
MATHEMATICA
Select[Range[600], Subtract @@ DigitSum[#, {2, 3}] == 1 &] (* Amiram Eldar, Aug 08 2024 *)
PROG
(Python)
from sympy.ntheory import digits
def ok(n): return sum(digits(n, 2)[1:]) == sum(digits(n, 3)[1:]) + 1
print([k for k in range(604) if ok(k)]) # Michael S. Branicky, Aug 08 2024
(PARI) isok(k) = sumdigits(k, 2) == 1 + sumdigits(k, 3); \\ Michel Marcus, Aug 08 2024
CROSSREFS
KEYWORD
nonn,base,new
AUTHOR
Robert Israel, Aug 07 2024
STATUS
approved
A374754 a(n) is the difference between the sum of the squares and the sum of the cubes for the n first terms of A002760. +0
0
0, 0, 4, -4, 5, 21, 46, 19, 55, 104, 104, 185, 285, 406, 281, 425, 594, 790, 574, 799, 1055, 1344, 1668, 1325, 1686, 2086, 2527, 3011, 2499, 3028, 3604, 4229, 4905, 4905, 5689, 6530, 7430, 8391, 7391, 8415, 9504, 10660, 11885, 13181, 11850, 13219, 14663, 16184 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
For A002760(n) <= k < A002760(n+1), the difference between the sum of the squares and the sum of the cubes in the first k nonnegative integers is a(n).
LINKS
FORMULA
a(1) = 0. For n >= 2, a(n) = a(n-1) + f*A002760(n) where f = 1 if A002760(n+1) is a square but not a cube, f = -1 if A002760(n) is a cube but not a square and f = 0 if A002760(n) is a square and a cube.
EXAMPLE
a(7) = a(6) + A002760(7) = 21 + 1*25 = 46, since 25 is a square but not a cube.
a(8) = a(7) - A002760(8) = 46 + (-1)*27 = 19, since 27 is a cube but not a square.
a(11) = a(10) + A002760(11) - A002760(11) = 104 + 0*64 = 104, since 64 is a square and a cube.
The difference between the sum of the squares and the sum of the cubes in the first 24 nonnegative integers is a(6) = 21, because A002760(6) = 16 <= 24 < A002760(7) = 25.
MAPLE
isA374754:=proc(k)
option remember;
if k=0 then 0
elif issqr(k) and not type(root(k, 3), integer) then procname(k-1)+k;
elif type(root(k, 3), integer) and not issqr(k) then procname(k-1)-k;
else procname(k-1)
fi;
end proc;
A374754:=k->
if k=0 then 0
elif isA374754(k)<>isA374754(k-1) or type(root(k, 6), integer) then isA374754(k)
fi;
seq(A374754(k), k=0..1521);
PROG
(PARI) lista(nn) = my(v = select(x->issquare(x) || ispower(x, 3), [0..nn]), s=0, w = vector(#v)); for (i=1, #v, if (issquare(v[i]), s += v[i]); if (ispower(v[i], 3), s -= v[i]); w[i] = s; ); w; \\ Michel Marcus, Aug 04 2024
CROSSREFS
Cf. A000330 (sum of squares), A000537 (sum of cubes), A001014 (sixth powers), A002760 (squares and cubes), A061023, A087285, A087286.
KEYWORD
sign,new
AUTHOR
Felix Huber, Jul 28 2024
STATUS
approved
A375261 Smallest n-digit reversible prime with only prime digits. +0
0
2, 37, 337, 3257, 32233, 322573, 3222223, 32235223, 322222223, 3222222257, 32222232577, 322222232537, 3222222223333, 32222222332733, 322222222237537, 3222222222223373, 32222222222223353, 322222222222225333, 3222222222222222577, 32222222222222225573, 322222222222222233253 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
FORMULA
a(n) <= A177513(n) for n > 1.
if a(n) is not a palindrome, a(n) = A177513(n) for n > 1.
PROG
(Python)
from sympy import isprime
from itertools import product
def a(n):
if n == 1: return 2
for first in "37":
for rest in product("2357", repeat=n-1):
s = first + "".join(rest)
if isprime(t:=int(s)) and isprime(int(s[::-1])):
return t
print([a(n) for n in range(1, 22)]) # Michael S. Branicky, Aug 08 2024
CROSSREFS
KEYWORD
base,nonn,new
AUTHOR
Jean-Marc Rebert, Aug 08 2024
STATUS
approved
A375258 Array read by antidiagonals: T(k,n) is the least positive integer whose sum of base-2 digits is k and sum of base-3 digits is n, or -1 if there is none. +0
0
1, 2, 3, -1, 6, 81, 8, 5, 28, 27, -1, 20, 7, 30, 2187, 128, 17, 14, 15, 244, 243, -1, 68, 25, 46, 31, 246, -1, 512, 8193, 26, 23, 94, 63, 6570, 19683, -1, 80, 131, 78, 47, 126, 247, 2430, 59049, 2048, 1025, 134, 53, 62, 95, 254, 255, 19926, 531441, -1, 2050, 161, 212, 79, 222, 127, 766, 2431 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
T(k,n) is the least positive integer x, if it exists, such that A000120(x) = k and A053735(x) = n.
T(k,n) == n (mod 2) unless T(k,n) = -1, since A053735(x) == x (mod 2). In particular, T(1, n) = -1 if n >= 3 is odd.
Dimitrov and Howe prove that for n > 25, the sum of binary digits of 3^n is > 22. In particular, this implies T(7,1) = T(12,1) = T(21,1) = -1, since none of the first 25 powers of 3 work.
LINKS
Vassil S. Dimitrov and Everett W. Howe, Powers of 3 with few nonzero bits and a conjecture of Erdős, arXiv:2105.06440 [math.NT], 2021.
EXAMPLE
Array starts
1, 2, -1, 8, -1, 128, -1, 512, ...
3, 6, 5, 20, 17, 68, 8193, 80, ...
81, 28, 7, 14, 25, 26, 131, 134, ...
27, 30, 15, 46, 23, 78, 53, 212, ...
2187, 244, 31, 94, 47, 62, 79, 158, ...
243, 246, 63, 126, 95, 222, 125, 238, ...
-1, 6570, 247, 254, 127, 382, 223, 446, ...
19683, 2430, 255, 766, 507, 510, 383, 958, ...
MAPLE
T:= Matrix(8, 8, -1):
for x from 1 to 10^5 do
k:= convert(convert(x, base, 2), `+`);
n:= convert(convert(x, base, 3), `+`);
if k <= 8 and n <= 8 and T[k, n] = -1 then T[k, n]:= x; fi
od:
T;
CROSSREFS
KEYWORD
sign,base,new
AUTHOR
Robert Israel, Aug 07 2024
STATUS
approved
A373804 Primes in A374965 sorted into increasing order. +0
0
3, 19, 103, 283, 313, 331, 463, 733, 751, 757, 1093, 1153, 1213, 1453, 1543, 1783, 2083, 2251, 2371, 2467, 2671, 2707, 2803, 3733, 3823, 7603, 7723, 8221, 9013, 9661, 14983, 15277, 15607, 16363, 16381, 16843, 17923, 19483, 20287, 21061, 22093, 23173, 24421, 24841, 25903, 27211, 28411 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Since we know the first 350199 terms of A374965, and A374965(350199) = 5026186 starts a new doubling chain, we know that any subsequent prime is greater than 5026186. This implies that the terms in the b-file, which are < 5026186, are correct. Of course, if the sequence reaches a Riesel number (cf. A076337) there will be no more primes after that point.
Note that, as can be seen from the b-file in A375028, A374965 contains many primes greater than 5026186 among the first 350199 terms, including one prime with 102410 digits. But these large primes cannot be added to the present b-file until more is discovered about primes following term 350199.
LINKS
CROSSREFS
KEYWORD
nonn,new
AUTHOR
N. J. A. Sloane, Aug 08 2024
STATUS
approved
A375220 T(n,k) is the number of permutations of the multiset {1, 1, 2, 2, ..., n, n} with k occurrences of fixed pairs (j,j), where T(n,k), n >= 2, 0 <= k <= n-2 is a triangle read by rows. +0
0
5, 74, 15, 2193, 296, 30, 101644, 10965, 740, 50, 6840085, 609864, 32895, 1480, 75, 630985830, 47880595, 2134524, 76755, 2590, 105, 76484389121, 5047886640 (list; table; graph; refs; listen; history; text; internal format)
OFFSET
2,1
LINKS
FORMULA
T(n,n) = 1, T(n,n-1) = 0 (terms not in DATA),
Sum_{j=0..n-2} T(n,j) = (2*n)!/(2^n) - 1 = A000680(n) - 1,
Sum_{j=1..n-2} T(n,j) = A375223(n) - 1.
EXAMPLE
The triangle begins
5,
74, 15,
2193, 296, 30,
101644, 10965, 740, 50,
6840085, 609864, 32895, 1480, 75,
630985830, 47880595, 2134524, 76755, 2590, 105
PROG
(PARI) \\ using functions mima and a375219 from A375219, row n of triangle:
a375219(n, sizeb=2)
CROSSREFS
Cf. A000680, A374980 (column 0), A375222 (column 1), A375223.
Cf. A375219 (similar for triples in the multiset).
KEYWORD
nonn,tabl,more,new
AUTHOR
Hugo Pfoertner, Aug 08 2024
STATUS
approved
A374468 Parity of the digit sum of n in factorial base. +0
0
0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
0
LINKS
FORMULA
a(n) = A000035(A034968(n)) = A066829(A276076(n)).
PROG
(PARI)
A034968(n) = { my(s=0, b=2, d); while(n, d = (n%b); s += d; n = (n-d)/b; b++); (s); };
A374468(n) = (A034968(n)%2);
CROSSREFS
Characteristic function of A227149, whose complement A227148 gives the indices of 0's.
KEYWORD
nonn,new
AUTHOR
Antti Karttunen and Peter Munn, Aug 08 2024
STATUS
approved
A375171 Square array T(n,k), n>0 and k>0, read by antidiagonals in ascending order, giving the smallest n*k-digit number that, if arranged in an n X k matrix, form k-digit reversible prime in each row and n-digit reversible prime in each column, or -1 if no such number exists. +0
0
2, 37, 37, 337, 1111, 337, 3257, 111331, 113131, 3257, 32233, 13139731, 113101311, 11933371, 32233, 322573, 1111179779, 113101929311, 119310213191, 1119711779, 322573, 3222223, 111111131397, 113101167919739, 1193100990013911, 111971042937997, 111119111337, 3222223 (list; table; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
FORMULA
T(1,n) = T(n,1) <= A177513(n) for n >1.
T(1,n) = T(n,1) = A177513(n) for n = 2..6.
EXAMPLE
T(3,2) = 111331 is the smallest 3*2-digit number that if arranged in a 3 X 2 matrix yields in each row and column an reversible prime, i.e.,
11
13
31
-> 11 (1 time), 13 (1 time), 31 (1 time), 113 (1 time), 131 (1 time) are all reversible primes.
Table begins (upper left corner = T(1,1)):
2 37 337 3257 ...
37 1111 113131 11933371 ...
337 111331 113101311 119310213191 ...
3257 13139731 113101929311 1193100990013911 ...
... ... ... ... ...
PROG
(PARI)
isp(x) = ispseudoprime(x) && ispseudoprime(fromdigits(Vecrev(digits((x)))));
ispd(x) = ispseudoprime(fromdigits(x)) && ispseudoprime(fromdigits(Vecrev(x)));
vp(n) = select(isp, [10^(n-1)..10^n-1]);
isok(val, n, k) = my(d=digits(val), v=vector(k, i, []), j=1); for (i=1, #d, v[j] = concat(v[j], d[i]); j++; if (j>k, j=1); ); for (i=1, k, if (!ispd(v[i]), return(0)); ); return(1);
T(n, k) = my(v = vp(k), nbp = #v, nb = nbp^n); for (i=0, nb-1, my(d=digits(i, nbp)); if (d==[], d=vector(n)); while(#d <n, d=concat(0, d)); d = apply(x->x+1, d); my(s=""); for (i=1, #d, s = concat(s, Str(v[d[i]]))); my(val = eval(s)); if (isok(val, n, k), return(val)); ); \\ Michel Marcus, Aug 08 2024
CROSSREFS
KEYWORD
tabl,base,nonn,new
AUTHOR
Jean-Marc Rebert, Aug 06 2024
STATUS
approved
A375245 Number of biquadratefree numbers <= n. +0
0
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 60, 61, 62, 63 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
FORMULA
a(n) = Sum_{d>=1} mu(d)*floor(n/d^4), where mu is the Moebius function A008683.
n/a(n) converges to zeta(4).
a(n) = Sum_{k = 1..n} A307430(k).
PROG
(Python)
from sympy import mobius, integer_nthroot
def A375245(n): return int(sum(mobius(k)*(n//k**4) for k in range(1, integer_nthroot(n, 4)[0]+1)))
CROSSREFS
KEYWORD
nonn,easy,new
AUTHOR
Chai Wah Wu, Aug 07 2024
STATUS
approved
A375219 T(n,k) is the number of permutations of the multiset {1, 1, 1, 2, 2, 2, ..., n, n, n} with k occurrences of fixed triples (j,j,j), where T(n,k), n >= 2, 0 <= k <= n-2 is a triangle read by rows. +0
0
19, 1622, 57, 362997, 6488, 114, 166336604, 1814985, 16220, 190 (list; table; graph; refs; listen; history; text; internal format)
OFFSET
2,1
COMMENTS
Trivially, T(n,n) = 1 and T(n,n-1) = 0.
LINKS
FORMULA
Sum_{j=0..n-2} T(n,j) = (3*n)!/(6^n) - 1 = A014606(n) - 1.
EXAMPLE
The triangle begins
19,
1622, 57,
362997, 6488, 114,
166336604, 1814985, 16220, 190
.
T(2,0) = 19: the permutations of {1,1,1,2,2,2} with no fixed triples are
[1,1,2,1,2,2], [1,1,2,2,1,2], [1,1,2,2,2,1], [1,2,1,1,2,2], [1,2,1,2,1,2], [1,2,1,2,2,1], [1,2,2,1,1,2], [1,2,2,1,2,1], [1,2,2,2,1,1], [2,1,1,1,2,2], [2,1,1,2,1,2], [2,1,1,2,2,1], [2,1,2,1,1,2], [2,1,2,1,2,1], [2,1,2,2,1,1], [2,2,1,1,1,2], [2,2,1,1,2,1], [2,2,1,2,1,1], [2,2,2,1,1,1].
PROG
(PARI) mima (x, n1=1, i2=-oo) = {my (n2, n=#x, mi=x[n1], ma=mi); n2=if (i2<=0, n, min(n, i2)); for (i=n1+1, n2, if (x[i]<mi, mi=x[i], if (x[i]>ma, ma=x[i]))); [mi, ma]};
\\ returns row n of triangle, bsize is the block size in the multiset.
a375219(n, bsize=3) = {my (p=vector(bsize*n, i, 1+(i-1)\bsize), r=s=vector(n), m=vector(n-1)); forperm (p, q, for (b=1, n, my (bm=bsize*(b-1), j=mima(q, bm+1, bm+bsize)); r[b]=j[1]; s[b]=j[2]); my (rs=vector(n, i, r[i]==i && s[i]==i)); for (k=0 , n-2, m[k+1]+=vecsum(rs)==k)); m}
CROSSREFS
Cf. A014606.
Cf. A374980, A375223 (columns 0 and 1 in a similar triangle for the multiset {1, 1, 2, 2, ..., n, n}).
KEYWORD
nonn,tabl,more,new
AUTHOR
Hugo Pfoertner, Aug 08 2024
STATUS
approved
page 1 2 3 4 5 6 7 8 9 10 ... 42

Search completed in 0.137 seconds

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 9 05:18 EDT 2024. Contains 375027 sequences. (Running on oeis4.)