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.

Previous Showing 31-35 of 35 results.

A378619 Distance between n and the greatest squarefree number <= n.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Dec 12 2024

Keywords

Crossrefs

Positions of 0 are A005117.
Positions of first appearances are A020755 - 1.
Positions of 1 are A053806.
Subtracting each term from n gives A070321.
The opposite version is A081221.
Restriction to the primes is A240473, opposite A240474.
A013929 lists the nonsquarefree numbers, differences A078147.
A061398 counts squarefree numbers between primes, zeros A068360.
A061399 counts nonsquarefree numbers between primes, zeros A068361.

Programs

  • Mathematica
    Table[n-NestWhile[#-1&,n,!SquareFreeQ[#]&],{n,100}]
  • PARI
    A378619(n) = forstep(k=n,1,-1,if(issquarefree(k), return(n-k))); \\ Antti Karttunen, Jan 29 2025
  • Python
    from itertools import count
    from sympy import factorint
    def A378619(n): return n-next(m for m in count(n,-1) if max(factorint(m).values(),default=0)<=1) # Chai Wah Wu, Dec 14 2024
    

Formula

a(n) = n - A070321(n).

Extensions

Data section extended to a(105) by Antti Karttunen, Jan 29 2025

A378458 Squarefree numbers k such that k + 1 is squarefree but k + 2 is not.

Original entry on oeis.org

2, 6, 10, 14, 22, 30, 34, 38, 42, 46, 58, 61, 66, 70, 73, 78, 82, 86, 94, 102, 106, 110, 114, 118, 122, 130, 133, 138, 142, 145, 154, 158, 166, 173, 178, 182, 186, 190, 194, 202, 205, 210, 214, 218, 222, 226, 230, 238, 246, 254, 258, 262, 266, 273, 277, 282
Offset: 1

Views

Author

Gus Wiseman, Dec 02 2024

Keywords

Comments

These are the positions of 2 in A378369 (difference between n and the next nonsquarefree number).
The asymptotic density of this sequence is Product_{p prime} (1 - 2/p^2) - Product_{p prime} (1 - 3/p^2) = A065474 - A206256 = 0.19714711803343537224... . - Amiram Eldar, Dec 03 2024

Crossrefs

Complement of A007675 within A007674.
The version for prime power instead of nonsquarefree is a subset of A006549.
Another variation is A073247.
The version for nonprime instead of squarefree is A179384.
Positions of 0 in A378369 are A013929.
Positions of 1 in A378369 are A373415.
Positions of 2 in A378369 are A378458 (this).
Positions of 3 in A378369 are A007675.
A000961 lists the powers of primes, differences A057820.
A120327 gives the least nonsquarefree number >= n.
A378373 counts composite numbers between nonsquarefree numbers.

Programs

  • Mathematica
    Select[Range[100],NestWhile[#+1&,#,SquareFreeQ[#]&]==#+2&]
  • PARI
    list(lim) = my(q1 = 1, q2 = 1, q3); for(k = 3, lim, q3 = issquarefree(k); if(q1 && q2 &&!q3, print1(k-2, ", ")); q1 = q2; q2 = q3); \\ Amiram Eldar, Dec 03 2024

A378620 Lesser prime index of twin primes with nonsquarefree mean.

Original entry on oeis.org

2, 5, 7, 17, 20, 28, 35, 41, 43, 45, 49, 52, 57, 64, 69, 81, 83, 98, 109, 120, 140, 144, 152, 171, 173, 176, 178, 182, 190, 206, 215, 225, 230, 236, 253, 256, 262, 277, 286, 294, 296, 302, 307, 315, 318, 323, 336, 346, 373, 377, 390, 395, 405, 428, 430, 444
Offset: 1

Views

Author

Gus Wiseman, Dec 10 2024

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.
This is a subset of A029707 (twin prime indices). The other twin primes are A068361, so A029707 is the disjoint union of A068361 and A378620.

Crossrefs

The lesser of twin primes is A001359, index A029707 (complement A049579).
The greater of twin primes is A006512, index A107770 (complement appears to be A168543).
A subset of A029707 (twin prime lesser indices).
Prime indices of the primes listed by A061368.
Indices of twin primes with squarefree mean are A068361.
A000040 lists the primes, differences A001223, (run-lengths A333254, A373821).
A005117 lists the squarefree numbers, differences A076259.
A006562 finds balanced primes.
A013929 lists the nonsquarefree numbers, differences A078147.
A014574 is the intersection of A006093 and A008864.
A038664 finds the first position of a prime gap of 2n.
A046933 counts composite numbers between primes.
A120327 gives the least nonsquarefree number >= n.

Programs

  • Mathematica
    Select[Range[100],Prime[#]+2==Prime[#+1]&&!SquareFreeQ[Prime[#]+1]&]
    PrimePi/@Select[Partition[Prime[Range[500]],2,1],#[[2]]-#[[1]]==2&&!SquareFreeQ[Mean[#]]&][[;;,1]] (* Harvey P. Dale, Jul 13 2025 *)

Formula

prime(a(n)) = A061368(n).

A118728 a(n) = smallest squarefree number not less than a(n-1)+a(n-2), a(1)=1, a(0)=0.

Original entry on oeis.org

0, 1, 2, 3, 5, 10, 15, 26, 41, 67, 109, 177, 286, 463, 749, 1213, 1963, 3178, 5141, 8319, 13461, 21781, 35242, 57023, 92265, 149289, 241554, 390845, 632399, 1023245, 1655645, 2678890, 4334537, 7013427, 11347966, 18361393, 29709359
Offset: 0

Views

Author

Reinhard Zumkeller, May 21 2006

Keywords

Crossrefs

Programs

  • Mathematica
    Module[{lst={0,1}},Do[Module[{k=Total[Take[lst,-2]]}, While[!SquareFreeQ[ k], k++];AppendTo[lst,k]],{40}];Join[{0},Drop[lst,2]]] (* Harvey P. Dale, May 16 2012 *)
    ssn[{a_,b_}]:=Module[{k=a+b},While[!SquareFreeQ[k],k++];k]; Join[{0},Drop[NestList[ {#[[2]],ssn[#]}&,{0,1},40][[;;,1]],2]] (* Harvey P. Dale, Aug 12 2024 *)

Formula

a(n) = A067535*(a(n-2)+a(n-1)) for n>1.

A283807 Smallest prime p such that A005117(k+1) - A005117(k-1) = n, where p = A005117(k) for some k.

Original entry on oeis.org

2, 3, 7, 47, 97, 241, 5051, 204329, 217069, 29002021, 190346677, 3568762019, 221167421, 18725346527
Offset: 2

Views

Author

Juri-Stepan Gerasimov, Mar 17 2017

Keywords

Examples

			2 is in this sequence because A005117(2+1) - A005117(2-1) = 3 - 1 = 2, where A005117(2) = 2 is prime for k = 2.
3 is in this sequence because A005117(3+1) - A005117(3-1) = 5 - 2 = 3, where A005117(3) = 3 is prime for k = 3.
7 is in this sequence because A005117(6+1) - A005117(6-1) = 10 - 6 = 4, where A005117(6) = 7 is prime for k = 6.
47 is in this sequence because A005117(31+1) - A005117(31-1) = 51 - 46 = 5, where A005117(31) = 47 is prime for k = 31.
97 is in this sequence because A005117(61+1) - A005117(61-1) = 101 - 95 = 6, where A005117(61) = 97 is prime for k = 61.
241 is in this sequence because A005117(150+1) - A005117(150-1) = 246 - 239 = 7, where A005117(150) = 241 is prime for k = 150.
5051 is in this sequence because A005117(3071+1) - A005117(3071-1) = 5053 - 5045 = 8, where A005117(3071) = 5051 is prime for k = 3071.
		

Crossrefs

Cf. A000040, A005117 (squarefree numbers), A067535, A070321.

Programs

  • Mathematica
    s = Select[Range[10^6], SquareFreeQ]; Table[k = 1; While[Nand[PrimeQ@ Set[p, s[[k]]], s[[k + 1]] - s[[k - 1]] == n], k++]; p, {n, 2, 10}] (* Michael De Vlieger, Mar 18 2017 *)

Extensions

a(10) from Michael De Vlieger, Mar 18 2017
a(11)-a(15) from Giovanni Resta, Mar 22 2017
Previous Showing 31-35 of 35 results.