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.

Showing 1-5 of 5 results.

A240473 Distance from prime(n) to the closest smaller squarefree number.

Original entry on oeis.org

1, 1, 2, 1, 1, 2, 2, 2, 1, 3, 1, 2, 2, 1, 1, 2, 1, 2, 1, 1, 2, 1, 1, 2, 2, 4, 1, 1, 2, 2, 4, 1, 3, 1, 3, 2, 2, 2, 1, 3, 1, 2, 1, 2, 2, 2, 1, 1, 1, 2, 2, 1, 2, 2, 2, 1, 2, 2, 3, 3, 1, 2, 2, 1, 2, 3, 1, 2, 1, 2, 4, 1, 1, 2, 2, 1, 3, 2, 2, 2, 1, 2, 1, 2, 1, 1
Offset: 1

Views

Author

Chris Boyd, Apr 06 2014

Keywords

Examples

			a(10) = 3 because 3 is the gap between prime(10) = 29 and the closest smaller squarefree number 26.
		

Crossrefs

Programs

  • PARI
    forprime(p=1,450,forstep(j=p-1,1,-1,if(issquarefree(j),print1(p-j", ");break)))

Formula

a(n) = A000040(n) - A112925(n). - Michel Marcus, Apr 10 2014

A240474 Distance from prime(n) to the closest larger squarefree number.

Original entry on oeis.org

1, 2, 1, 3, 2, 1, 2, 2, 3, 1, 2, 1, 1, 3, 4, 2, 2, 1, 2, 2, 1, 3, 2, 2, 4, 1, 2, 2, 1, 1, 2, 2, 1, 2, 2, 3, 1, 2, 3, 1, 2, 1, 2, 1, 2, 2, 2, 3, 2, 1, 2, 2, 5, 2, 1, 2, 2, 2, 1, 1, 2, 2, 2, 2, 1, 1, 3, 2, 2, 4, 1, 3, 3, 1, 2, 2, 1, 1, 1, 1, 2, 1, 2, 1, 3, 2
Offset: 1

Views

Author

Chris Boyd, Apr 06 2014

Keywords

Examples

			a(9) = 3 because 3 is the gap between prime(9) = 23 and the closest larger squarefree number 26.
		

Crossrefs

Programs

  • PARI
    forprime(p=1,450,for(j=p+1,2*p,if(issquarefree(j),print1(j-p", ");break)))

Formula

a(n) = A112926(n) - A000040(n). - Michel Marcus, Apr 10 2014

A240476 Primes that are not midway between the closest flanking squarefree numbers.

Original entry on oeis.org

3, 5, 7, 11, 13, 23, 29, 31, 37, 41, 43, 47, 59, 61, 67, 71, 73, 79, 83, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 167, 173, 179, 181, 191, 193, 211, 223, 227, 229, 239, 241, 257, 263, 277, 281, 283, 311, 313, 317, 331, 347, 349, 353
Offset: 1

Views

Author

Chris Boyd, Apr 06 2014

Keywords

Comments

Primes for which the corresponding A240473(m) is not equal to A240474(m).
Primes not equal to the average of the closest flanking squarefree numbers.
Primes not equal to the average of three consecutive squarefree numbers.
Complement of A240475 relative to A000040.

Examples

			29 is a term because it is not midway between the closest flanking squarefree numbers 26 and 30.
On the other hand, 19 is not a term because it is midway between the closest flanking squarefree numbers 17 and 21.
		

Crossrefs

Programs

  • PARI
    forprime(p=1,353,forstep(j=p-1,1,-1,if(issquarefree(j),L=j;break));for(j=p+1,2*p,if(issquarefree(j),G=j;break));if(G-p!=p-L,print1(p", ")))

A245289 Balanced squarefrees (of order one): squarefree numbers which are the average of the previous squarefree number and the following squarefree number.

Original entry on oeis.org

2, 6, 14, 17, 19, 22, 26, 30, 34, 38, 42, 53, 55, 58, 66, 70, 78, 86, 89, 91, 94, 102, 106, 110, 114, 130, 138, 142, 158, 161, 163, 166, 170, 178, 182, 186, 194, 197, 199, 202, 210, 214, 218, 222, 230, 233, 235, 238, 249
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jul 16 2014

Keywords

Comments

All even a(n) are numbers of the form 4k + 2 (as with all even squarefree numbers).

Examples

			2 is in this sequence because it is squarefree and the average of the previous squarefree number 1 and the following squarefree number 3.
		

Crossrefs

Programs

  • Mathematica
    With[{sqfr=Select[Range[500],SquareFreeQ]},Transpose[Select[ Partition[ sqfr,3,1],(#[[1]]+#[[3]])/2==#[[2]]&]][[2]]] (* Harvey P. Dale, Dec 15 2014 *)
  • PARI
    v = select(n->issquarefree(n), vector(300, n, n));
    for(k=2, #v-1, if(2*v[k] == v[k-1]+v[k+1], print1(v[k], ", "))) \\ Colin Barker, Jul 17 2014

Formula

With b(m) = A005117(m), m >= 2, this is the sequence of the increasingly ordered members of the set {b(m): b(m) = (b(m-1)+ b(m+1))/2}. - Wolfdieter Lang, Jul 25 2014

A245589 Primes which are the average of the two adjacent primes and also of the two adjacent squarefree numbers.

Original entry on oeis.org

53, 593, 1747, 2287, 4013, 4409, 5563, 6317, 8117, 10657, 10853, 11933, 12547, 12583, 12653, 15161, 16937, 17047, 17851, 18341, 19603, 19949, 20107, 22051, 26693, 31051, 32993, 35851, 35911, 39113, 42209, 42533, 44041, 46889, 47527, 48259, 50417, 51461
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jul 26 2014

Keywords

Comments

Intersection of A006562 and A240475. Intersection of A006562 and A245289.

Examples

			53 is in this sequence because 53 = prime(16) = (prime(15) + prime(17))/2 = (47 + 59)/2 and 53 = squarefree(33) = (squarefree(32) + squarefree(34))/2 = (51 + 55)/2.
		

Crossrefs

Programs

  • Maple
    Primes:= select(isprime,[$1..10^5]):
    Sqfree:= select(numtheory:-issqrfree,[$1..10^5]):
    A:= NULL:
    for i from 2 to nops(Primes)-1 do
       if Primes[i] = (Primes[i+1]+Primes[i-1])/2 then
          member(Primes[i],Sqfree,'j');
          if Primes[i] = (Sqfree[j-1]+Sqfree[j+1])/2 then
             A:= A,Primes[i]
          fi
       fi
    od:
    A; # Robert Israel, Aug 21 2014
  • PARI
    maxp=60000;
    p=[]; my(v=primes(maxp)); for(k=2, #v-1, if(2*v[k] == v[k-1]+v[k+1], p=concat(p, v[k]))); p;
    v = select(n->issquarefree(n), vector(maxp, n, n));
    s=[]; for(k=2, #v-1, if(2*v[k] == v[k-1]+v[k+1], s=concat(s, v[k]))); s;
    setintersect(p, s) \\ Colin Barker, Aug 07 2014

Extensions

Missing term (16937) inserted by Colin Barker, Aug 07 2014
Showing 1-5 of 5 results.