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.

User: Zhandos Mambetaliyev

Zhandos Mambetaliyev's wiki page.

Zhandos Mambetaliyev has authored 16 sequences. Here are the ten most recent ones:

A342870 a(n) is the number of twin primes between A001359(n)^2 and A001359(n)*(A001359(n)+1).

Original entry on oeis.org

1, 1, 0, 0, 1, 2, 2, 1, 2, 2, 0, 2, 4, 1, 1, 1, 5, 1, 3, 4, 2, 5, 4, 2, 4, 3, 6, 6, 3, 5, 6, 6, 4, 6, 4, 7, 9, 6, 8, 9, 6, 8, 10, 6, 11, 9, 13, 8, 12, 6, 14, 4, 7, 11, 11, 15, 9, 10, 12, 11, 10, 12, 13, 8, 15, 14, 11, 12, 9, 11, 15, 14, 18, 16, 11, 18, 10
Offset: 1

Author

Zhandos Mambetaliyev, Mar 28 2021

Keywords

Crossrefs

Programs

  • PARI
    {for(k=1, 400, if(prime(k+1)-prime(k)==2, my(c=0); forprime(m=prime(k)^2, prime(k)*(prime(k)+1), c+=isprime(m+2)); print1(c, ", ")))}

A342552 The number of twin primes between prime(i)*prime(i+1) and prime(i+1)*prime(i+2) where prime(i) and prime(i+1) are twin primes.

Original entry on oeis.org

2, 3, 4, 3, 5, 6, 9, 11, 8, 12, 24, 19, 34, 14, 27, 14, 28, 17, 46, 26, 24, 55, 28, 14, 86, 50, 38, 66, 28, 67, 76, 41, 64, 40, 43, 93, 53, 87, 67, 48, 89, 66, 42, 72, 69, 76, 49, 76, 42, 49, 59, 73, 260, 109, 145, 169, 70, 137, 193, 292
Offset: 1

Author

Zhandos Mambetaliyev, Mar 27 2021

Keywords

Crossrefs

Programs

  • PARI
    {for(n=1,200, if(prime(n+1)-prime(n)==2, my(a=prime(n)*prime(n+1), b=prime(n+1)*prime(n+2), c=0); for(m=a,b, if(isprime(m)==1&&isprime(m+2)==1, c=c+1)); print1(c, ", ")))}

A337022 a(n) is the number of positive integers <= A070826(n) with at least one odd prime divisor <= prime(n).

Original entry on oeis.org

0, 1, 7, 57, 675, 9255, 163095, 3190965, 75051075, 2212976535, 69624142665, 2606749381005, 107980344307605, 4687299592683015, 222157161929253705, 11859617311615438365, 704152383312290447535, 43210523173814533171635, 2910538720151462674819545, 207666871186142520765307695
Offset: 1

Author

Zhandos Mambetaliyev, Aug 11 2020

Keywords

Comments

The set of finite differences positive numbers up to A070826(n) with at least one odd prime divisor <= prime(n) is a palindromic set.

Examples

			a(3) = 7, p = {3, 5}, prime(n)# / 2 = 15, {3, 5, 6, 9, 10, 12, 15} - divisible by 3 or 5.
		

Crossrefs

Programs

  • PARI
    pm=1; forprime(p=2,19,pm*=p; my(k=0); for(x=2,pm/2, forprime(q=3,p, if(x%q==0,k++;break))); print1(k,", ")) \\ Hugo Pfoertner, Aug 11 2020

Formula

a(n+1) = (prime(n+1) - 1)*a(n) + A070826(n). - Jinyuan Wang, Aug 11 2020
a(n) = A002110(n)/2 - A005867(n). - Jamie Morken, Aug 11 2021

Extensions

a(8)-a(10) from Hugo Pfoertner, Aug 11 2020
More terms from Jinyuan Wang, Aug 11 2020

A331809 a(1) = 1; a(2) = 2; thereafter a(n) is the smallest number > a(n-1) which is neither of the form 2*a(i) nor Sum_{j=1..n-1} ( b_j*a(j) ) where 0 < i < n, b_j = 1 or 0.

Original entry on oeis.org

1, 2, 5, 9, 13, 31, 35, 92, 118, 280, 350, 866, 1102, 2668, 3368, 8240, 10444, 25420, 32156, 78464, 99352, 242128, 306440, 747272, 945976, 2306128, 2919008, 7117088, 9009040, 21964144, 27802160, 67784384, 85802464, 209191168, 264795488, 645591584, 817196512, 1992379072
Offset: 1

Author

Zhandos Mambetaliyev, Jan 27 2020

Keywords

Comments

Inserting the additional term a(0) = 3 would result in a so-called complete sequence after sorting. (The sorted sequence will then meet Brown's criterion.)

Crossrefs

Programs

  • PARI
    /* a(n) for 0
    				

Extensions

a(12)-a(15) from Hugo Pfoertner, Jan 27 2020
More terms, using Rémy Sigrist's C++ at A331811 from Hugo Pfoertner, Jan 28 2020

A331800 a(1) = 1; thereafter a(n) is the smallest number > a(n-1) which is neither of the form 2*a(i) nor Sum_{j=1..n-1} ( b_j*a(j) ) where 0 < i < n, b_j = 0 or 1.

Original entry on oeis.org

1, 3, 5, 7, 17, 19, 50, 64, 152, 190, 470, 598, 1448, 1828, 4472, 5668, 13796, 17452, 42584, 53920, 131408, 166312, 405560, 513400, 1251584, 1584208, 3862592, 4889392, 11920400, 15088816, 36788000, 46566784, 113532416, 143710048, 350376032, 443509600, 1081305728
Offset: 1

Author

Zhandos Mambetaliyev, Jan 26 2020

Keywords

Comments

Inserting the additional term a(0) = 2 would result in a so-called complete sequence after sorting. (The sorted sequence will then meet Brown's criterion.)

Crossrefs

Programs

  • PARI
    /* a(n) for n>0 */
    upto(lim)={my(a=[1], b=[]); for(i=1, lim, forsubset(#a, x, b=concat(b, [vecsum(vecextract(a, x))])); b=setminus(vecsort(b, , 8), a); for(j=1, #a, b=concat(b, [2*a[j]]); b=vecsort(b, , 8)); if(setsearch(b, i)==0, a=concat(a, [i]); a=vecsort(a, , 8)) ); a}
    { upto(200) }

Extensions

a(13)-a(14) from Hugo Pfoertner, Jan 27 2020
More terms, using Rémy Sigrist's C++ at A331811 from Hugo Pfoertner, Jan 28 2020

A331811 a(n) is the next number after a(n-1) which cannot be represented in the form 2*a(i) and Sum_{j=1..n-1} b_j*a(j) where 0 < i < n, b_j = 1 or 0. The sequence starts: a(1) = 1; a(2) = 2; a(3) = 3; a(4) = 5.

Original entry on oeis.org

1, 2, 3, 5, 12, 25, 49, 73, 171, 195, 512, 658, 1560, 1950, 4826, 6142, 14868, 18768, 45920, 58204, 141660, 179196, 437264, 553672, 1349328, 1707720, 4164392, 5271736, 12851568, 16267008, 39662048, 50205520, 122401584, 154935600, 377748224, 478159264, 1165778688, 1475649888
Offset: 1

Author

Zhandos Mambetaliyev, Jan 27 2020

Keywords

Comments

This sequence is a complete sequence.

Crossrefs

(C++) See Links section.

Programs

  • Mathematica
    Nest[Append[#, Block[{k = #[[-1]] + 1}, While[Nand[NoneTrue[#, k == 2 # &], FreeQ[Map[Total, Rest@ Subsets[#]], k]], k++]; k]] & @@ {#, Map[Total, Subsets[#]]} &, {1, 2, 3, 5}, 10] (* Michael De Vlieger, Jan 27 2020 *)
  • PARI
    upto(lim)={my(a=[1, 2, 3, 5], b=[]); for(i=1, lim, forsubset(#a, x, b=concat(b, [vecsum(vecextract(a, x))])); b=setminus(vecsort(b, , 8), a); for(j=1, #a, b=concat(b, [2*a[j]]); b=vecsort(b, , 8)); if(setsearch(b, i)==0, a=concat(a, [i]); a=vecsort(a, , 8)) ); a}
    { upto(200) }

Extensions

a(13)-a(14) from Hugo Pfoertner, Jan 27 2020
More terms from Rémy Sigrist, Jan 28 2020

A309945 a(n) = floor(n - sqrt(2*n-1)).

Original entry on oeis.org

0, 0, 0, 1, 2, 2, 3, 4, 4, 5, 6, 7, 8, 8, 9, 10, 11, 12, 12, 13, 14, 15, 16, 17, 18, 18, 19, 20, 21, 22, 23, 24, 24, 25, 26, 27, 28, 29, 30, 31, 32, 32, 33, 34, 35, 36, 37, 38, 39, 40, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 60
Offset: 1

Author

Zhandos Mambetaliyev, Aug 24 2019

Keywords

Comments

The subsequence consisting of numbers that appear twice is A007590.
Sequence as triangle:
0;
0;
0; 1, 2;
2, 3, 4;
4, 5, 6, 7, 8;
8, 9, 10, 11, 12;
12, 13, 14, 15, 16, 17, 18;
18, 19, 20, 21, 22, 23, 24;
...
a(1) = 0; for n > 1, a(n) is the number of squares strictly between 2*n - 2 and n^2.

Examples

			For n = 3, 2*n - 2 = 4, n^2 = 9, no square numbers strictly between 4 and 9, a(3) = 0.
For n=5, 2*n - 2 = 8, n^2 = 25, two square numbers (9, 16) strictly between 8 and 25, a(5) = 2.
		

Crossrefs

Programs

  • Mathematica
    Table[Floor[n-(2*n-1)^(1/2)],{n,73}] (* Stefano Spezia, Aug 24 2019 *)
  • PARI
    a(n) = floor(n - sqrt(2*n-1)); \\ Jinyuan Wang, Aug 26 2019
    
  • Python
    from math import isqrt
    def A309945(n): return (m:=n-1)-isqrt(m<<1) # Chai Wah Wu, Aug 04 2022

Formula

a(n) = n-1-floor(sqrt(2*n-2)). - Wesley Ivan Hurt, Dec 03 2020

A306863 a(n) is the number of primes between the n-th and (n+1)-st odd composite numbers.

Original entry on oeis.org

2, 2, 1, 0, 2, 0, 1, 2, 1, 0, 1, 0, 2, 0, 1, 2, 0, 1, 1, 0, 1, 0, 0, 1, 2, 2, 1, 0, 0, 0, 0, 0, 1, 1, 0, 2, 0, 0, 0, 2, 0, 1, 0, 1, 1, 0, 1, 0, 2, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 2, 1, 0, 2, 0, 0, 0, 1, 0, 1, 0, 1, 0, 2, 0, 1, 2, 0, 0, 0, 1, 0, 0
Offset: 1

Author

Zhandos Mambetaliyev, Mar 14 2019

Keywords

Examples

			The first few odd composite numbers are 9, 15, 21, 25, 27, 33, 35, 39, 45, 49. Between 9 and 15, there are two primes (11 and 13); between 15 and 21 there are also two primes (17 and 19); between 21 and 25 there is only one prime (23), etc.
		

Crossrefs

Cf. A071904, A000040, A001223 (differences between primes), A164510, A001097.

Programs

  • Mathematica
    Differences@ PrimePi@ Complement[Range[3, #, 2], Prime@ Range[2, PrimePi@ #]] &@ 300 (* Michael De Vlieger, Apr 21 2019 *)
    Differences[PrimePi/@Select[Range[3,301,2],CompositeQ]] (* Harvey P. Dale, Sep 16 2023 *)
  • PARI
    { b=9; for(i=6, 150, if(isprime(2*i-1)==0, print1(primepi(2*i-1)-primepi(b), ", "); b=2*i-1)) }
    
  • Python
    from itertools import count
    from sympy import primepi, isprime
    def A306863(n):
        if n == 1: return 2
        m, k = n, primepi(n) + n + (n>>1)
        while m != k:
            m, k = k, primepi(k) + n + (k>>1)
        return next(c for c in count(0) if not isprime(m+(c<<1)+2)) # Chai Wah Wu, Aug 02 2024

A306848 Product of first n odd nonprimes, a(n) = Product_{k=1..n} A071904(k).

Original entry on oeis.org

1, 9, 135, 2835, 70875, 1913625, 63149625, 2210236875, 86199238125, 3878965715625, 190069320065625, 9693535323346875, 533144442784078125, 30389233238692453125, 1914521694037624546875, 124443910112445595546875, 8586629797758746092734375
Offset: 0

Author

Zhandos Mambetaliyev, Mar 13 2019

Keywords

Crossrefs

Programs

  • Mathematica
    With[{nn = 70}, FoldList[Times, Complement[Range[1, nn, 2], Prime@ Range[2, PrimePi@ nn]]]] (* Michael De Vlieger, Apr 21 2019 *)
  • PARI
    lista(nn) = {my(p=1); print1(p, ", "); forcomposite (n=1, nn, if (n%2, p *= n; print1(p, ", ")); ); } \\ Michel Marcus, Mar 13 2019

A292410 Difference between (2n+1)^2 and highest power of 2 less than or equal to (2n+1)^2.

Original entry on oeis.org

0, 1, 9, 17, 17, 57, 41, 97, 33, 105, 185, 17, 113, 217, 329, 449, 65, 201, 345, 497, 657, 825, 1001, 161, 353, 553, 761, 977, 1201, 1433, 1673, 1921, 129, 393, 665, 945, 1233, 1529, 1833, 2145, 2465, 2793, 3129, 3473, 3825, 89, 457, 833, 1217, 1609, 2009, 2417, 2833, 3257
Offset: 0

Author

Zhandos Mambetaliyev, Sep 15 2017

Keywords

Examples

			a(0) = 1^2 - 2^0 =  0.
a(1) = 3^2 - 2^3 =  1.
a(2) = 5^2 - 2^4 =  9.
a(3) = 7^2 - 2^5 = 17.
a(4) = 9^2 - 2^6 = 17.
		

Crossrefs

Cf. A000079 (2^n), A016754 (odd squares), A053645 (distance to power of 2), A056577.

Programs

  • Maple
    seq((2*n+1)^2 - 2^ilog2((2*n+1)^2), n=0..100); @ Robert Israel, Oct 19 2017
  • Mathematica
    Table[# - 2^Floor@ Log2@ # &[(2 n + 1)^2], {n, 0, 53}] (* Michael De Vlieger, Sep 18 2017 *)
  • PARI
    a(n) = my(k = 0); while(2^k < (2*n+1)^2, k++); if (k, k--); (2*n+1)^2 - 2^k; \\ Michel Marcus, Sep 16 2017

Formula

a(n) = A053645(A016754(n)). - Michel Marcus, Sep 16 2017

Extensions

More terms from Michel Marcus, Sep 16 2017