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-3 of 3 results.

A157936 Numbers n divisible by the least prime >= sqrt(n).

Original entry on oeis.org

2, 4, 6, 9, 10, 15, 20, 25, 28, 35, 42, 49, 55, 66, 77, 88, 99, 110, 121, 130, 143, 156, 169, 170, 187, 204, 221, 238, 255, 272, 289, 304, 323, 342, 361, 368, 391, 414, 437, 460, 483, 506, 529, 551, 580, 609, 638, 667, 696, 725, 754, 783, 812, 841, 868, 899, 930
Offset: 1

Views

Author

M. F. Hasler, Mar 10 2009

Keywords

Comments

Contains A001248, A006094 and A157937 as subsequences.

Crossrefs

Cf. A157942.

Programs

  • Mathematica
    dQ[n_]:=Module[{srn=Sqrt[n],x},x=If [PrimeQ[srn],srn,NextPrime[srn]];Divisible[n,x]]; Select [Range[1000],dQ]  (* Harvey P. Dale, Mar 12 2011 *)
  • PARI
    for( n=1,1999, n % nextprime(sqrtint(n-1)+1) || print1(n",")) /* sqrtint(n-1)+1 avoids rounding errors but can be replaced by sqrt(n) for small n */

Formula

A157938 Numbers n divisible by the least prime >= sqrt(n) but not by the largest prime <= sqrt(n).

Original entry on oeis.org

10, 20, 28, 42, 55, 66, 88, 99, 110, 130, 156, 170, 187, 204, 238, 255, 272, 304, 342, 368, 391, 414, 460, 483, 506, 551, 580, 609, 638, 696, 725, 754, 783, 812, 868, 930, 962, 999, 1036, 1073, 1110, 1184, 1221, 1258, 1295, 1332, 1394, 1435, 1476, 1558
Offset: 1

Views

Author

M. F. Hasler, Mar 10 2009

Keywords

Comments

Also: Numbers n divisible by the least prime >= sqrt(n) which are not in A001248 (primes squared) or A006094 (product of two consecutive primes). A subsequence of A157937.

Examples

			a(1)=10 and a(2)=20 are divisible by 5 = nextprime(sqrt(10)) = nextprime(sqrt(20)) and neither a prime squared (as are 4 and 9) nor product of consecutive primes (as are 6 and 15).
5,7,8 are not in this sequence, since not a multiple of 3=nextprime(sqrt(5))=nextprime(sqrt(8)).
		

Crossrefs

Cf. A157940.

Programs

  • Mathematica
    dpQ[n_]:=Module[{srn=Sqrt[n],a,b},a=If[PrimeQ[srn],srn,NextPrime[ srn]];b=If[PrimeQ[srn],srn,NextPrime[srn,-1]]; Divisible[n,a]&& !Divisible[ n,b]]; Select[Range[2000],dpQ] (* Harvey P. Dale, Oct 10 2011 *)
  • PARI
    for( n=5,1999, n % nextprime(sqrtint(n-1)+1) & next; n % precprime(sqrtint(n)) & print1(n","))

Formula

A157939 Numbers n divisible by precprime(sqrt(n)) or nextprime(sqrt(n)) but not both, where precprime=A007917, nextprime=A007918.

Original entry on oeis.org

8, 10, 12, 18, 20, 21, 24, 28, 30, 40, 42, 45, 55, 56, 63, 66, 70, 84, 88, 91, 98, 99, 105, 110, 112, 119, 130, 132, 154, 156, 165, 170, 182, 187, 195, 204, 208, 234, 238, 247, 255, 260, 272, 273, 286, 304, 306, 340, 342, 357, 368, 380, 391, 399, 414, 418, 456
Offset: 1

Views

Author

M. F. Hasler, Mar 10 2009

Keywords

Comments

Equal to the union of its disjoint subsequences A157938 and A157940.

Examples

			For n=1,2,3, precprime(sqrt(n)) is undefined, so these are not considered here. a(1) = 8 is divisible by 2=precprime(sqrt(8)) but not by 3=nextprime(sqrt(8)).
a(2) = 10 is divisible by 5=nextprime(sqrt(10)) but not by 3=precprime(sqrt(8)).
n=4,6,9,... are excluded since divisible by both precprime(sqrt(n)) and nextprime(sqrt(n)). (Note that precprime=A007917 and nextprime=A007918 are defined using weak inequalities.) n=5,7,11,13 but also 14 are excluded since not divisible by precprime(sqrt(n)) nor by nextprime(sqrt(n)).
		

Programs

  • Mathematica
    ndQ[n_]:=Module[{s=Sqrt[n]},Total[Boole[{Divisible[n,NextPrime[ s]], Divisible[ n, NextPrime[ s,-1]]}]]==1]; Select[Range[5,500],ndQ] (* Harvey P. Dale, Mar 19 2019 *)
  • PARI
    for( n=4,999, !(n % nextprime(sqrtint(n-1)+1)) != !(n % precprime(sqrtint(n))) & print1(n",")) /* sqrtint(n-1)+1 avoids rounding errors but can be replaced by sqrt(n) for small n */

Formula

A157939 = A157938 union A157940 = A157937 /\ A157941 = A157936 /\ A157942, where A /\ B = (A u B) \ (A n B) = (A \ B) u (B \ A) is the symmetric difference; A157937 intersect A157941 = A006094 = (A157936 intersect A157942) \ A001248.
Showing 1-3 of 3 results.