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.

A073492 Numbers having at least one prime gap in their factorization.

Original entry on oeis.org

10, 14, 20, 21, 22, 26, 28, 33, 34, 38, 39, 40, 42, 44, 46, 50, 51, 52, 55, 56, 57, 58, 62, 63, 65, 66, 68, 69, 70, 74, 76, 78, 80, 82, 84, 85, 86, 87, 88, 91, 92, 93, 94, 95, 98, 99, 100, 102, 104, 106, 110, 111, 112, 114, 115, 116, 117, 118, 119, 122, 123, 124, 126
Offset: 1

Views

Author

Reinhard Zumkeller, Aug 03 2002

Keywords

Comments

A073490(a(n)) > 0.
A137794(a(n))=0, complement of A073491. - Reinhard Zumkeller, Feb 11 2008

Crossrefs

Programs

  • Haskell
    a073492 n = a073492_list !! (n-1)
    a073492_list = filter ((> 0) . a073490) [1..]
    -- Reinhard Zumkeller, Dec 20 2013
  • Mathematica
    pa[n_, k_] := If[k == NextPrime[n], 0, 1]; Select[Range[126],Total[pa @@@ Partition[First /@ FactorInteger[#], 2, 1]] > 0 &] (* Jayanta Basu, Jul 01 2013 *)

A073493 Numbers having exactly one prime gap in their factorization.

Original entry on oeis.org

10, 14, 20, 21, 22, 26, 28, 33, 34, 38, 39, 40, 42, 44, 46, 50, 51, 52, 55, 56, 57, 58, 62, 63, 65, 66, 68, 69, 70, 74, 76, 78, 80, 82, 84, 85, 86, 87, 88, 91, 92, 93, 94, 95, 98, 99, 100, 102, 104, 106, 111, 112, 114, 115, 116, 117, 118, 119, 122, 123, 124, 126, 129
Offset: 1

Views

Author

Reinhard Zumkeller, Aug 03 2002

Keywords

Examples

			200 is a term, as 200 = 2*2*2*5*5 with one gap between 2 and 5.
		

Crossrefs

Programs

  • Haskell
    a073493 n = a073493_list !! (n-1)
    a073493_list = filter ((== 1) . a073490) [1..]
    -- Reinhard Zumkeller, Dec 20 2013
    
  • Mathematica
    pa[n_, k_] := If[k == NextPrime[n], 0, 1]; Select[Range[130], Total[pa @@@ Partition[First /@ FactorInteger[#], 2, 1]] == 1 &] (* Jayanta Basu, Jul 01 2013 *)
  • Python
    from sympy import primefactors, nextprime
    def ok(n):
        pf = primefactors(n)
        return sum(p2 != nextprime(p1) for p1, p2 in zip(pf[:-1], pf[1:])) == 1
    print(list(filter(ok, range(1, 130)))) # Michael S. Branicky, Oct 14 2021

Formula

A073490(a(n)) = 1.

A073490 Number of prime gaps in factorization of n.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Aug 03 2002

Keywords

Comments

A137723(n) is the smallest number of the first occurring set of exactly n consecutive numbers with at least one prime gap in their factorization: a(A137723(n)+k)>0 for 0<=kA137723(n)-1)=a(A137723(n)+n)=0. - Reinhard Zumkeller, Feb 09 2008

Examples

			84 = 2*2*3*7 with one gap between 3 and 7, therefore a(84) = 1;
110 = 2*5*11 with two gaps: between 2 and 5 and between 5 and 11, therefore a(110) = 2.
		

Crossrefs

Programs

  • Haskell
    a073490 1 = 0
    a073490 n = length $ filter (> 1) $ zipWith (-) (tail ips) ips
       where ips = map a049084 $ a027748_row n
    -- Reinhard Zumkeller, Jul 04 2012
    
  • Maple
    A073490 := proc(n)
        local a,plist ;
        plist := sort(convert(numtheory[factorset](n),list)) ;
        a := 0 ;
        for i from 2 to nops(plist) do
            if op(i,plist) <> nextprime(op(i-1,plist)) then
                a := a+1 ;
            end if;
        end do:
        a;
    end proc:
    seq(A073490(n),n=1..110) ; # R. J. Mathar, Oct 27 2019
  • Mathematica
    gaps[n_Integer/;n>0]:=If[n===1, 0, Complement[Prime[PrimePi[Rest[ # ]]-1], # ]&[First/@FactorInteger[n]]]; Table[Length[gaps[n]], {n, 1, 120}] (* Wouter Meeussen, Oct 30 2004 *)
    pa[n_, k_] := If[k == NextPrime[n], 0, 1]; Table[Total[pa @@@ Partition[First /@ FactorInteger[n], 2, 1]], {n, 120}] (* Jayanta Basu, Jul 01 2013 *)
  • Python
    from sympy import primefactors, nextprime
    def a(n):
        pf = primefactors(n)
        return sum(p2 != nextprime(p1) for p1, p2 in zip(pf[:-1], pf[1:]))
    print([a(n) for n in range(1, 121)]) # Michael S. Branicky, Oct 14 2021

Formula

a(n) = A073484(A007947(n)).
a(A000040(n))=0; a(A000961(n))=0; a(A006094(n))=0; a(A002110(n))=0; a(A073485(n))=0.
a(A073486(n))>0; a(A073487(n)) = 1; a(A073488(n))=2; a(A073489(n))=3.
a(n)=0 iff A073483(n) = 1.
a(A097889(n)) = 0. - Reinhard Zumkeller, Nov 20 2004
0 <= a(m*n) <= a(m) + a(n) + 1. A137794(n) = 0^a(n). - Reinhard Zumkeller, Feb 11 2008

Extensions

More terms from Franklin T. Adams-Watters, May 19 2006

A073495 Numbers having exactly three prime gaps in their factorization.

Original entry on oeis.org

1870, 2090, 2470, 2530, 2990, 3190, 3410, 3458, 3740, 3770, 3910, 4030, 4070, 4180, 4186, 4510, 4730, 4810, 4930, 4940, 5060, 5170, 5187, 5270, 5278, 5330, 5474, 5510, 5590, 5642, 5830, 5890, 5980, 6110, 6279, 6290, 6380, 6490, 6710, 6734, 6820, 6890
Offset: 1

Views

Author

Reinhard Zumkeller, Aug 03 2002

Keywords

Examples

			1870 is a term, as 1870 = 2*5*11*17 with three gaps: between 2 and 5, between 5 and 11 and between 11 and 17.
		

Crossrefs

Programs

  • Haskell
    a073495 n = a073495_list !! (n-1)
    a073495_list = filter ((== 3) . a073490) [1..]
    -- Reinhard Zumkeller, Dec 20 2013
  • Mathematica
    q[n_] := SequenceCount[FactorInteger[n][[;; , 1]], {p1_, p2_} /; p2 != NextPrime[p1], Overlaps -> True] == 3; Select[Range[7000], q] (* Amiram Eldar, Apr 10 2021*)

Formula

A073490(a(n)) = 3.

A073488 Squarefree numbers having exactly two prime gaps.

Original entry on oeis.org

110, 130, 170, 182, 190, 230, 238, 266, 273, 290, 310, 322, 357, 370, 374, 399, 406, 410, 418, 430, 434, 470, 483, 494, 506, 518, 530, 546, 561, 574, 590, 598, 602, 609, 610, 627, 638, 651, 658, 670, 682, 710, 714, 730, 741, 742, 754, 759, 777, 782, 790
Offset: 1

Views

Author

Reinhard Zumkeller, Aug 03 2002

Keywords

Examples

			1430 is a term, as 1430 = 2*5*11*13 with two gaps: between 2 and 5 and between 5 and 11.
		

Crossrefs

Programs

  • Mathematica
    q[n_] := SequenceCount[FactorInteger[n][[;; , 1]], {p1_, p2_} /; p2 != NextPrime[p1], Overlaps -> True] == 2; Select[Range[800], SquareFreeQ[#] && q[#] &] (* Amiram Eldar, Apr 10 2021 *)

Formula

A073484(a(n)) = 2.
Showing 1-5 of 5 results.