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: Michel ten Voorde

Michel ten Voorde's wiki page.

Michel ten Voorde has authored 17 sequences. Here are the ten most recent ones:

A062316 Neither the sum or difference of 2 squares.

Original entry on oeis.org

6, 14, 22, 30, 38, 42, 46, 54, 62, 66, 70, 78, 86, 94, 102, 110, 114, 118, 126, 134, 138, 142, 150, 154, 158, 166, 174, 182, 186, 190, 198, 206, 210, 214, 222, 230, 238, 246, 254, 258, 262, 266, 270, 278, 282, 286, 294, 302, 310, 318, 322, 326, 330, 334, 342, 350, 354, 358
Offset: 1

Author

Michel ten Voorde, Jul 05 2001

Keywords

Comments

Elements of A022544 congruent to 2 (mod 4).
Union of numbers congruent to 6 mod 8 (A017137) with numbers of the form 2 * A084109(n). - Franklin T. Adams-Watters, Jan 21 2007
Explanation: odd numbers are equal to the difference between two successive squares and among even numbers, multiples of 4 are of the form (k+2)^2-k^2, thus odd numbers and multiples of 4 are not in the sequence. Conversely, a difference of 2 squares cannot equal 2 (mod 4), thus this sequence contains the integers of the form 4k+2 that are in A022544 (not the sum of two squares); among integers of form 4k+2, this sequence contains all the integers of the form 8n+6 (A017137) that are not the sum of 2 squares because they have at least one prime factor congruent to 3 (mod 4) to an odd power; it also contains integers of the form 8n+2 = 2(4n+1) with 4n+1 not the sum of two squares, which is sequence A084109. - Jean-Christophe Hervé, Oct 24 2015

Examples

			From _Jean-Christophe Hervé_, Oct 24 2015: (Start)
6, 14, 22, 30, 38, 46, ... are in the sequence because they equal 6 (mod 8).
42 = 2*3*7, 66 = 2*3*11, 114 = 2*7*11 are also in the sequence: of the form 2*(4n+1) with 4n+1 not the sum of 2 squares.
(End)
		

Crossrefs

Cf. A022544, A016825, union of A017137 and 2*A084109, complement of A263715.

Programs

  • Maple
    N:= 1000: # to get all terms <= N
    S:= {seq(4*i+2,i=0..floor((N-2)/4))}
      minus {seq(seq(x^2 + y^2, y = x .. floor(sqrt(N-x^2)),2),x=1..floor(sqrt(N)))}:
    sort(convert(S,list)); # Robert Israel, Oct 25 2015
  • Mathematica
    Select[Range@ 360, SquaresR[2, #] == 0 && Mod[#, 4] == 2 &] (* Michael De Vlieger, Oct 26 2015, after Harvey P. Dale at A022544 *)

Formula

a(n) == 2 (mod 4). Subsequence of A016825 (non-differences of squares). All first differences are either 4 or 8, each of which occurs infinitely often. - David W. Wilson, Mar 09 2005
Lim_{n->inf} a(n)/n = 4.

Extensions

More terms from David W. Wilson, Feb 11 2003

A063535 Primes prime(n) such that prime(n+1)^2 < prime(n)*prime(n+2).

Original entry on oeis.org

2, 5, 11, 17, 19, 29, 41, 43, 59, 71, 79, 83, 101, 107, 109, 127, 137, 149, 163, 179, 191, 197, 227, 229, 239, 269, 281, 283, 311, 313, 331, 347, 349, 353, 379, 383, 397, 401, 419, 431, 439, 443, 461, 463, 487, 499, 503, 521, 541, 569, 571, 599, 617, 641, 643
Offset: 0

Author

Michel ten Voorde, Aug 02 2001

Keywords

Comments

Conjecture: these are the primes such that prime(n+2) - 2*prime(n+1) + prime(n) > 0. If so, this sequence with A122535 and A147812 partition the primes. - Clark Kimberling, May 16 2015

Examples

			a(2) = 5 because 7*7 < 5*11.
		

Crossrefs

Programs

  • Maple
    N:= 1000: # to get all entries where prime(n+2) <= N
    Primes:= select(isprime,[2,seq(2*i+1,i=1..floor((N-1)/2))]):
    J:= select(j -> Primes[j+1]^2Robert Israel, Jun 23 2015
  • PARI
    j=[]; for(n=1,400, if(prime(n+1)^2<(prime(n)*prime(n+2)),j=concat(j, prime(n)))); j
    
  • PARI
    { n=-1; for (m=1, 10^9, if (prime(m + 1)^2 < prime(m)*prime(m + 2), write("b063535.txt", n++, " ", prime(m)); if (n==1000, break)) ) } \\ Harry J. Smith, Aug 25 2009

Extensions

More terms from Jason Earls, Aug 03 2001

A061670 Distance to nearest prime power p^k, k=0 and k >= 2 (A025475).

Original entry on oeis.org

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

Author

Michel ten Voorde, Jun 16 2001

Keywords

Examples

			a(12)=3 because 9=3^2 is the nearest power to 12 (12-9=3).
		

Crossrefs

There are four different sequences which may legitimately be called "prime powers": A000961 (p^k, k >= 0), A246655 (p^k, k >= 1), A246547 (p^k, k >= 2), A025475 (p^k, k=0 and k >= 2).

Programs

  • Maple
    N:= 1000: # to get a(1)..a(M) where M is the greatest prime power <= N.
    Primes:= select(isprime, [2,seq(i,i=3..floor(sqrt(N)))]):
    Pows:= sort(convert({1,seq(seq(p^e,e=2..floor(log[p](N))),p=Primes)},list)):
    nP:= nops(Pows):
    M:= Pows[nP]:
    V:= Vector(M):
    V[2]:= 1:
    for i from 2 to nP-1 do
      for x from ceil((Pows[i]+Pows[i-1])/2) to floor((Pows[i]+Pows[i+1])/2) do
        V[x]:= abs(x - Pows[i])
    od od:
    for x from ceil((M+Pows[nP-1])/2) to M do V[x]:= M - x od:
    convert(V,list); # Robert Israel, Mar 23 2018
  • PARI
    isA025475(n) = {isprimepower(n) && !isprime(n) || n==1}
    a(n) = {my(k=0); while(!isA025475(n+k) && !isA025475(n-k), k++); k; } \\ Altug Alkan, Mar 23 2018

Extensions

Definition corrected, and more terms from Robert Israel, Mar 23 2018

A062346 Consider 2n tennis players; a(n) is the number of matches needed to let every possible pair play each other.

Original entry on oeis.org

3, 45, 210, 630, 1485, 3003, 5460, 9180, 14535, 21945, 31878, 44850, 61425, 82215, 107880, 139128, 176715, 221445, 274170, 335790, 407253, 489555, 583740, 690900, 812175, 948753, 1101870, 1272810, 1462905, 1673535, 1906128, 2162160, 2443155
Offset: 2

Author

Michel ten Voorde, Jul 06 2001

Keywords

Comments

Number of matchings of size two (edges) in a complete graph on 2n vertices.

Examples

			a(2)=3: given players a,b,c,d, the matches needed are (ab,cd), (ac,bd), (ad,bc).
For example, for the K_4 on vertices {0,1,2,3} the possible matchings of size two are: {{0,1}, {2,3}}, {{0,3},{1,2}} and {{0,2},{1,3}}.
		

Crossrefs

Cf. A014105.

Programs

  • Magma
    [n*(n-1)*(2*n-3)*(2*n-1)/2: n in [2..40]]; // Vincenzo Librandi, Oct 13 2013
  • Maple
    A062346:=n->n*(n-1)*(2*n-3)*(2*n-1)/2; seq(A062346(k),k=2..100); # Wesley Ivan Hurt, Oct 14 2013
  • Mathematica
    CoefficientList[Series[3 (1 + 10 x + 5 x^2)/(1 - x)^5, {x, 0, 40}], x] (* Vincenzo Librandi, Oct 13 2013 *)
    LinearRecurrence[{5,-10,10,-5,1},{3,45,210,630,1485},40] (* Harvey P. Dale, Nov 22 2022 *)
  • PARI
    a(n) = n*(n-1)*(2*n-3)*(2*n-1)/2; \\ Joerg Arndt, Oct 13 2013
    

Formula

a(n) = n*(4*n^3 - 12*n^2 + 11*n - 3)/2. - Swapnil P. Bhatia (sbhatia(AT)cs.unh.edu), Jul 20 2006
a(n+1) = (2*n+2)*(2*n+1)*(2*n)*(2*n-1)/8. - James Mahoney, Oct 19 2011
G.f.: 3*x^2*(1 + 10*x + 5*x^2)/(1 - x)^5. - Vincenzo Librandi, Oct 13 2013
a(n) = binomial(2*n^2-3*n+1, 2). - Wesley Ivan Hurt, Oct 14 2013
a(n) = A014105(n-1)*(A014105(n-1)-1)/2. - Bruno Berselli, Dec 28 2016

Extensions

More terms from Swapnil P. Bhatia (sbhatia(AT)cs.unh.edu), Jul 20 2006

A060298 Number of powers x^y (x,y > 1) with n digits.

Original entry on oeis.org

3, 12, 34, 94, 263, 768, 2333, 7167, 22291, 69751, 219081, 689736, 2174856, 6864354, 21679391, 68497906, 216485583, 684323923, 2163459803, 6840258025, 21628220224, 68388917596, 216252901472, 683826283482, 2162393925204, 6837972506895, 21623315009817
Offset: 1

Author

Michel ten Voorde, Apr 10 2001

Keywords

Comments

Conjectures from Robert G. Wilson v, Aug 29 2012: (Start)
Limit_{n->oo} a(2n)/10^n = 1 - 1/sqrt(10).
Limit_{n->oo} a(2n-1)/10^n = 1/sqrt(10) - 1/10. (End)
These follow from the Formula. - Robert Israel, Apr 29 2020
Limit_{n->oo} a(n)/a(n-1) = sqrt(10). - Bernard Schott, Jan 21 2023

Examples

			a(1) = 3 because there are 3 powers with 1 digit: 2^2, 2^3 and 3^2.
		

Crossrefs

Cf. A001597, A089580 (partial sums).

Programs

  • Maple
    f:= proc(n) local y;
      add(ceil(10^(n/y))-ceil(10^((n-1)/y)), y=2..floor(n*log[2](10)))
    end proc:
    f(1):= 3:
    map(f, [$1..20]); # Robert Israel, Apr 29 2020
  • Python
    # see link
    
  • Python
    from sympy import integer_nthroot, integer_log
    def A060298(n):
        if n == 1: return 3
        c, y, a, b, t = 0, 2, 10**n-1, 10**(n-1)-1, (10**n).bit_length()
        while yChai Wah Wu, Oct 16 2023

Formula

a(n) = Sum_{y=2..floor(n*log_2(10))} (ceiling(10^(n/y)) - ceiling(10^((n-1)/y))) for n >= 2. - Robert Israel, Apr 29 2020
a(n) = A089580(n+1) - A089580(n) for n > 1. - Karl-Heinz Hofmann, Sep 18 2023

Extensions

a(10)-a(18) from Donovan Johnson, Dec 14 2009
a(19)-a(27) from Donovan Johnson, Aug 29 2012

A061348 Consider a (solid) triangle with n cells on each edge, for a total of n(n+1)/2 cells; a(n) is number of inequivalent ways of labeling cells with 0's and 1's; triangle may be rotated and turned over.

Original entry on oeis.org

2, 4, 20, 208, 5728, 351616, 44772352, 11453771776, 5864078802944, 6004800040206336, 12297829416834170880, 50371909152808594571264, 412646679762074900658913280, 6760803201217259503457555972096, 221537999297485988040673580072042496
Offset: 1

Author

Michel ten Voorde, Jun 08 2001

Keywords

Examples

			a(2) = 4, the labelings being {000}, {001}, {011}, {111}. Some of the 20 solutions for n=3 are as follows:
..0......1.......0......1.......1.......1.......0
.0.0....0.0.....1.0....1.0.....0.0.....0.0.....1.1
0.0.0..0.0.0...0.0.0..0.0.0...1.0.0...0.1.0...0.0.0
The first solution for n = 4 is
...0
..0.0
.0.0.0
0.0.0.0
		

Crossrefs

Cf. A061709.

Programs

  • Maple
    A061348 := proc(n) local t1, v, a; a := n*(n+1)/2; v := floor((n+1)/2); if n mod 3 = 1 then t1 := n*(n+1)/6+2/3; else t1 := n*(n+1)/6; fi; (1/6)*(2^a + 2*2^t1+3*2^(a/2+v/2)); end; # from Burnside's Lemma
  • Mathematica
    A061348[n_] := Module[{t1, v, a}, a = n*(n+1)/2; v = Floor[(n+1)/2]; If[Mod[n, 3] == 1, t1 = n*(n+1)/6+2/3, t1 = n*(n+1)/6]; (1/6)*(2^a+2*2^t1+3*2^(a/2+v/2))]; Table[A061348[n], {n, 1, 15}] (* Jean-François Alcover, Feb 03 2014, after Maple *)

Formula

See Maple code for formula.

Extensions

Formula and more terms from N. J. A. Sloane, Jun 20 2001

A060382 In base n, a(n) is the smallest number m that leads to a palindrome-free sequence, using the following process: start with m; reverse the digits and add it to m, repeat. Stop if you reach a palindrome.

Original entry on oeis.org

22, 103, 290, 708, 1079, 2656, 1021, 593, 196, 1011, 237, 2701, 361, 447, 413, 3297, 519, 341, 379, 711, 461, 505, 551, 1022, 649, 701, 755, 811, 869, 929, 991, 1055, 1799, 1922, 1259, 1331, 1405, 1481, 1559, 1639, 1595, 1762, 1891, 1934, 2069, 2161
Offset: 2

Author

Michel ten Voorde, Apr 03 2001

Keywords

Comments

Only a(2) is proved, all the others are conjectured. - Eric Chen, Apr 20 2015 [corrected by A.H.M. Smeets, May 27 2019]
Brown's link reports a(3) as 103 instead of 100. What is the correct value? Dmitry Kamenetsky, Mar 06 2017 [a(3) = 103 is correct as from A077404, A.H.M. Smeets, May 27 2019]
From A.H.M. Smeets, May 27 2019: (Start)
It seems that a(n) < n^2 (i.e., a(n) in base n has two digits) and the least significant digit of a(n) in base n equals n-1, for n > 73.
For n <= 73 and the least significant digit of a(n) in base n is unequal to n-1, then the most significant digit of a(n) in base n equals 1.
From this it seems that, the least significant digit of a(n) in base n equals n-1 or the most significant digit of a(n) in base n equals 1, holds for all n > 1.
For n > 305 it seems that a(n) < n^2 - n - 1.
It seems that a(n) >= n*floor(3*n/4)-1; i.e. for any a(n) which is represented by a two-digit number in base n, the most significant digit is at least floor(3*n/4)-1. (End)
From A.H.M. Smeets, May 30 2019: (Start)
a(n) is a 5-digit number in base n representation for n in {2,3,4,5,7}.
a(n) is a 4-digit number in base n representation for n in {6,8,13}.
a(n) is a 3-digit number in base n representation for n in {9,10,11,12,14,15,16,17,18,21,25,34,35,52,71,72,73}.
For all other bases n, a(n) is a 2-digit number in base-n representation.
If a(n) = n*floor(3*n/4)-1, then n == 0 (mod 4) or n == 3 (mod 4). (End)

Examples

			a(2) = 22 since A062129(k) > -1 (equivalently, A062131(k) > -1) for k < 22.
		

Crossrefs

For the first palindrome in non-palindrome-free sequences, cf. A062129/A062131 (base 2), A033865 (base 10), A253241 (base 12).

Programs

  • Python
    def rev(n,base):
        m = 0
        while n > 0:
            n, m = n//base, m*base+n%base
        return m
    n, a, steps = 2, 3, 0
    while n <= 20000:
        aa = a
        ra = rev(a,n)
        while aa != ra and steps < 1000:
            aa = aa+ra
            ra, steps = rev(aa,n), steps+1
        if aa == ra:
            a, aa, steps = a+1, a+1, 0
        if steps == 1000:
            print(n,a)
            n, a, steps = n+1, n+2, 0 # A.H.M. Smeets, May 27 2019

Extensions

More terms from Karl Hovekamp, Jan 03 2007

A061014 a(n) is the smallest number k such that k! contains k exactly n times.

Original entry on oeis.org

0, 1, 37, 313, 80, 99, 586, 743, 5972, 9253, 8736, 9789
Offset: 0

Author

Michel ten Voorde, May 22 2001

Keywords

Comments

Any further terms have k > 52000. - Sean A. Irvine, Jan 16 2023

Examples

			a(3)=313 because in 313! 313 appears exactly 3 times.
		

Crossrefs

Cf. A067109.

Programs

  • Mathematica
    a = Table[ -1, {12}]; Do[b = Length[ StringPosition[ ToString[n! ], ToString[n]]]; If[a[[b+1]] == -1, a[[b+1]] = n], {n, 0, 15000} ]; a

Extensions

More terms from Robert G. Wilson v, Jan 09 2002

A060462 Integers k such that k! is divisible by k*(k+1)/2.

Original entry on oeis.org

1, 3, 5, 7, 8, 9, 11, 13, 14, 15, 17, 19, 20, 21, 23, 24, 25, 26, 27, 29, 31, 32, 33, 34, 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, 76, 77, 79, 80, 81, 83, 84, 85, 86, 87, 89, 90, 91, 92, 93, 94
Offset: 1

Author

Michel ten Voorde, Apr 09 2001

Keywords

Comments

k! / (k-th triangular number) is an integer.
a(n) = A072668(n) for n>0.
From Bernard Schott, Dec 11 2020: (Start)
Numbers k such that Sum_{j=1..k} j divides Product_{j=1..k} j.
k is a term iff k != p-1 with p is an odd prime (see De Koninck & Mercier reference).
The ratios obtained a(n)!/T(a(n)) = A108552(n). (End)

Examples

			5 is a term because 5*4*3*2*1 = 120 is divisible by 5 + 4 + 3 + 2 + 1 = 15.
		

References

  • Jean-Marie De Koninck & Armel Mercier, 1001 Problèmes en Théorie Classique des Nombres, Problème 181 pp. 31 and 163, Ellipses, Paris, 2004.
  • Joseph D. E. Konhauser et al., Which Way Did The Bicycle Go?, Problem 98, pp. 29; 145-146, MAA Washington DC, 1996.

Crossrefs

Programs

  • Maple
    for n from 1 to 300 do if n! mod (n*(n+1)/2) = 0 then printf(`%d,`,n) fi:od:
  • Mathematica
    Select[Range[94], Mod[#!, #*(# + 1)/2] == 0 &] (* Jayanta Basu, Apr 24 2013 *)
  • PARI
    { f=1; t=0; n=-1; for (m=1, 4000, f*=m; t+=m; if (f%t==0, write("b060462.txt", n++, " ", m)); if (n==2000, break); ) } \\ Harry J. Smith, Jul 05 2009
    
  • Python
    from sympy import composite
    def A060462(n): return composite(n-1)-1 if n>1 else 1 # Chai Wah Wu, Aug 02 2024

Extensions

Corrected and extended by Henry Bottomley and James Sellers, Apr 11 2001
Offset corrected by Alois P. Heinz, Dec 11 2020

A060421 Numbers k such that the first k digits of the decimal expansion of Pi form a prime.

Original entry on oeis.org

1, 2, 6, 38, 16208, 47577, 78073, 613373
Offset: 1

Author

Michel ten Voorde, Apr 05 2001

Keywords

Comments

The Brown link states that in 2001 Ed T. Prothro reported discovering that 16208 gives a probable prime and that Prothro verified that all values for 500 through 16207 digits of Pi are composites. - Rick L. Shepherd, Sep 10 2002
The corresponding primes are in A005042. - Alexander R. Povolotsky, Dec 17 2007

Examples

			3 is prime, so a(1) = 1; 31 is prime, so a(2) = 2; 314159 is prime, so a(3) = 6; ...
		

Crossrefs

Primes in other constants: A064118 (e), A065815 (gamma), A064119 (phi), A118328 (Catalan's constant), A115377 (sqrt(2)), A119344 (sqrt(3)), A228226 (log 2), A228240 (log 10), A119334 (zeta(3)), A122422 (Soldner's constant), A118420 (Glaisher-Kinkelin constant), A174974 (Golomb-Dickman constant), A118327 (Khinchin's constant).
In other bases: A065987 (binary), A065989 (ternary), A065991 (quaternary), A065990 (quinary), A065993 (senary).

Programs

  • Mathematica
    Do[If[PrimeQ[FromDigits[RealDigits[N[Pi, n + 10], 10, n][[1]]]], Print[n]], {n, 1, 9016} ]

Extensions

a(6) = 47577 from Eric W. Weisstein, Apr 01 2006
a(7) = 78073 from Eric W. Weisstein, Jul 13 2006
a(8) = 613373 from Adrian Bondrescu, May 29 2016