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: Gionata Neri

Gionata Neri's wiki page.

Gionata Neri has authored 42 sequences. Here are the ten most recent ones:

A334212 Least number k such that n^k + 1 is not squarefree.

Original entry on oeis.org

3, 1, 5, 3, 7, 1, 1, 5, 11, 1, 10, 7, 3, 1, 17, 1, 2, 1, 3, 11, 10, 1, 1, 13, 1, 1, 10, 3, 31, 1, 2, 10, 5, 1, 37, 10, 2, 1, 5, 2, 10, 1, 1, 21, 47, 1, 1, 1, 3, 1, 10, 1, 5, 1, 3, 2, 10, 1, 14, 21, 1, 1, 5, 3, 21, 1, 2, 3, 2, 1, 10, 10, 1, 1, 7, 3, 10, 1
Offset: 2

Author

Gionata Neri, Apr 18 2020

Keywords

Comments

For n == 1 (mod 4) (n not 1), a(n) <= (n + 1)/2.
For n == 3 (mod 4), a(n) = 1.
For even n, a(n) <= n + 1.
Existence proof for n >= 2 and upper bounds use the binomial formula.

Crossrefs

Programs

  • PARI
    for(n=2,79, for(k=1,n+1, !issquarefree(n^k+1)&!print1(k", ")&break))

A334213 Numbers m such that m^k + 1 is squarefree for all 0 <= k <= m.

Original entry on oeis.org

0, 1, 2, 4, 6, 10, 16, 30, 36, 46, 256
Offset: 1

Author

Gionata Neri, Apr 18 2020

Keywords

Comments

m = 2^i is a term iff k*i is not in A049096 with 0 < k < m + 1. Up to i = 128, there are no more terms of the form 2^i. a(12) > 10^7, if it exists. - Jinyuan Wang, May 01 2020

Examples

			4^0 + 1 = 2 is squarefree, 4^1 + 1 = 5 is squarefree, 4^2 + 1 = 17 is squarefree, 4^3 + 1 = 5*13 is squarefree and 4^4 + 1 = 257 is squarefree, so 4 is in the sequence.
		

Crossrefs

Programs

  • Mathematica
    Do[L=Length[a];a=Select[a=m^Range[0,m-1]+1,SquareFreeQ[#]&];If[L==m-1,Print[m-1]],{m,0,1000}] (* Metin Sariyar, Apr 21 2020 *)
  • PARI
    isOK(m) = k=0; until(k>m, if(!issquarefree(m^k+1), return(0)); k++); 1;
    for(m=0, 99, if(isOK(m), print1(m, ", ")))

Extensions

a(11) from Jinyuan Wang, May 01 2020

A334214 Odd numbers m such that m^k + 1 is squarefree for all 0 <= k <= (m - 1)/2.

Original entry on oeis.org

1, 5, 9, 13, 21, 25, 85, 105, 165
Offset: 1

Author

Gionata Neri, Apr 18 2020

Keywords

Comments

a(10) > 10000, if it exists. Most of the relevant factorizations of 165^k+1 were already present in the FactorDB database. The factorization of 165^79+1 has been completed with the software CADO-NFS. - Giovanni Resta, Apr 22 2020

Crossrefs

Programs

  • PARI
    isOK(m) = k=0; until(k>(m-1)/2, if(!issquarefree(m^k+1), return(0)); k++); 1;
    for(m=0, 140, if(isOK(m)&&m%2==1, print1(m, ", ")))

Extensions

a(9) from Giovanni Resta, Apr 22 2020

A306878 Number of 0 < k < n such that n-k and n+k are both nonprimes.

Original entry on oeis.org

0, 0, 0, 0, 2, 1, 2, 3, 3, 3, 5, 5, 6, 6, 7, 6, 9, 10, 8, 10, 11, 10, 12, 13, 13, 13, 15, 14, 16, 18, 15, 18, 20, 16, 20, 21, 20, 21, 24, 21, 23, 26, 24, 24, 29, 25, 27, 30, 26, 30, 32, 29, 31, 33, 31, 33, 36, 33, 34, 41, 34, 36, 42, 35, 40, 42, 40, 40, 43, 42, 44, 48, 44, 44
Offset: 1

Author

Gionata Neri, Mar 14 2019

Keywords

Crossrefs

Programs

  • PARI
    a(n)=my(s); for(c=1, n-1, s+=(bigomega(n-c)-1)*(bigomega(n+c)-1)!=0); s

Formula

a(n) = n - 1 - A061357(n) - A291564(n).

A319081 Number of primes of the form k^3 + n^2 for 0 <= k <= n.

Original entry on oeis.org

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

Author

Gionata Neri, Sep 09 2018

Keywords

Crossrefs

Cf. A066649.

Programs

  • PARI
    for(n=0,90,a=sum(k=0,n,isprime(k^3+n^2));print1(a", "))

Formula

a(n) = 0 if n is a cube other than 1.

A305629 Number of values of k, 0 < k < n, for which (2*n^2 + 2*k*n - k^2 - k)/2 is prime.

Original entry on oeis.org

0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 0, 3, 3, 1, 3, 5, 2, 2, 4, 2, 1, 4, 3, 2, 4, 1, 4, 4, 2, 4, 4, 3, 1, 3, 2, 4, 12, 3, 2, 7, 1, 7, 15, 3, 4, 6, 3, 8, 8, 2, 4, 10, 6, 7, 7, 3, 6, 16, 3, 4, 6, 3, 8, 7, 4, 5, 11, 5, 4, 7, 5, 8, 12, 2, 12, 8, 4, 16, 9, 3, 8, 24, 6, 8, 11, 5, 8, 19, 3
Offset: 0

Author

Gionata Neri, Jul 08 2018

Keywords

Comments

It appears that a(A046174(n)) = 0.

Crossrefs

Cf. A046174.

Programs

  • PARI
    a(n) = sum(k=1, n-1, isprime((2*n^2+2*k*n-k^2-k)/2))

A300737 Numbers of the form (k*i + 1)*(k*j - 1) with i, j >= 1 and k >= 2.

Original entry on oeis.org

3, 5, 7, 8, 9, 11, 13, 14, 15, 17, 19, 20, 21, 23, 24, 25, 26, 27, 29, 31, 32, 33, 35, 37, 38, 39, 41, 43, 44, 45, 47, 48, 49, 50, 51, 53, 54, 55, 56, 57, 59, 61, 62, 63, 64, 65, 67, 68, 69, 71, 73, 74, 75, 77, 79, 80, 81, 83, 84, 85, 86, 87, 89, 90, 91, 92, 93, 95, 97, 98, 99, 101
Offset: 1

Author

Gionata Neri, Mar 11 2018

Keywords

Crossrefs

Cf. A056868.

Programs

  • PARI
    limit=100; v=vector(limit); for(n=0,limit, for(k=2,floor(limit^(1/2)), for(i=1,limit/k, for(j=1,limit/k,if(n==(k*i+1)*(k*j-1),v[n]=1,))))); for(n=1,limit,if(v[n],print1(n", ")))

A299145 Primes of the form j^k + (j-1)^k + ... + 2^k, for j > 1 and k > 0.

Original entry on oeis.org

2, 5, 13, 29, 97, 139, 353, 4889, 72353, 353815699, 42065402653, 84998999651, 102769130749, 15622297824266188673, 28101527071305611527, 20896779938941631284493075599148668795944697935466419104293, 105312291668560568089831550410013687058921146068446092937783402353
Offset: 1

Author

Gionata Neri, Feb 03 2018

Keywords

Comments

Except for the terms 2, 5, 13, 29, 139, the exponent k satisfies k >= 4. More generally, if Q(j) = j^k + (j-1)^k + ... + 2^k is a term, then j-1 is a divisor of A064538(k). This is because (j-1) is a factor of Q(j) and thus Q(j) is prime only if j-1 is a divisor of the denominator of Q(j), i.e. A064538(k). Thus for each k there is only a finite number of values of j to check. This provides an efficient algorithm to find terms of this sequence by looking only for primes in the numbers H_{j,-k} - 1 = j^k + (j-1)^k + ... + 2^k for j-1 a divisor of A064538(k). - Chai Wah Wu, Mar 06 2018

Examples

			2 = 2^1;
5 = 3^1 + 2^1;
13 = 3^2 + 2^2;
29 = 4^2 + 3^2 + 2^2;
97 = 3^4 + 2^4;
139 = 7^2 + 6^2 + 5^2 + 4^2 + 3^2 + 2^2;
353 = 4^4 + 3^4 + 2^4;
4889 = 4^6 + 3^6 + 2^6;
72353 = 4^8 + 3^8 + 2^8;
		

Crossrefs

Programs

  • Mathematica
    With[{nn = 350}, Sort@ Flatten@ Map[Select[#, PrimeQ] &, Table[Total[Range[j, 1, -1]^k] - 1, {j, 2, nn}, {k, nn - j}]]] (* Michael De Vlieger, Feb 03 2018 *)
  • PARI
    limit=100000; v=vector(limit); for(n=1, ceil((-1+(1+8*limit)^(1/2))/2), for(k=1, logint(limit, n+0^(n-1)), a=sum(i=1,n,i^k)-1;if(isprime(a)&&a
    				

Extensions

a(10)-a(15) from Michael De Vlieger, Feb 03 2018
a(16)-a(17) from Chai Wah Wu, Mar 07 2018

A293271 Numbers n such that n - p and n + p are both prime for some prime p.

Original entry on oeis.org

5, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 22, 24, 26, 30, 32, 34, 36, 39, 40, 42, 44, 45, 46, 48, 50, 54, 56, 60, 64, 66, 69, 70, 72, 76, 78, 81, 84, 86, 90, 92, 96, 99, 100, 102, 104, 105, 106, 108, 110, 111, 114, 116, 120, 126, 129, 130, 132, 134, 138, 140, 142
Offset: 1

Author

Gionata Neri, Oct 04 2017

Keywords

Comments

Apart from a(1), all terms are composite.
Union of A087679 and 2*A063713. - Robert Israel, Oct 09 2017

Crossrefs

Cf. A087679, A087695, A087696, A087697 (subsequences).
Cf. A063713.

Programs

  • Maple
    filter:= proc(n) local k;
      k:= 1;
      while k < n do
        k:= nextprime(k);
        if isprime(n+k) and isprime(n-k) then return true fi
      od;
      false
    end proc:
    select(filter, [$1..1000]); # Robert Israel, Oct 09 2017
  • Mathematica
    Select[Range@ 142, Function[n, AnyTrue[Prime@ Range@ PrimePi@ n, PrimeQ[n + {-#, #}] == {True, True} &]]] (* Michael De Vlieger, Oct 09 2017 *)
  • PARI
    a(n) = forprime(p=1, n, i=n-p; j=n+p; if(isprime(i)&&isprime(j), n; break))

A292922 Triangle read by rows: T(n,k) is the number of numbers <= primorial(n) with k prime factors, counted without multiplicity.

Original entry on oeis.org

1, 4, 1, 16, 12, 1, 60, 116, 32, 1, 377, 1085, 745, 101, 1, 3323, 11172, 11534, 3735, 264, 1, 42518, 153752, 195801, 99914, 17808, 715, 1, 646580, 2464246, 3535748, 2314475, 667138, 69877, 1624, 1, 12285485, 48959467
Offset: 1

Author

Gionata Neri, Sep 26 2017

Keywords

Examples

			The triangle T(n, m) begins:
n\k   1     2     3     4     5     6
1:    1
2:    4     1
3:   16    12     1
4:   60   116    32     1
5:  377  1085   745   101     1
6: 3323 11172 11534  3735   264     1
		

Crossrefs

Cf. A001221.

Programs

  • PARI
    a(n) = r=prod(i=1,n,prime(i)); for(s=1,n,k=sum(t=2,r,omega(t)==s) ; k)