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

A249695 a(n)=0, if A249441(n)=0; otherwise, a(n) is the smallest i such that A249441(n)^2 divides binomial(n,i).

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 3, 0, 1, 2, 3, 0, 1, 6, 3, 7, 1, 2, 3, 4, 1, 6, 3, 0, 1, 2, 3, 12, 1, 6, 3, 5, 1, 2, 3, 4, 1, 6, 3, 8, 1, 2, 3, 12, 1, 6, 3, 21, 1, 2, 3, 4, 1, 6, 3, 24, 1, 2, 3, 12, 1, 6, 3, 1, 1, 2, 3, 4, 1, 6, 3, 8, 1, 2, 3, 12, 1, 6, 3, 16, 1, 2, 3, 4, 1, 6, 3
Offset: 0

Views

Author

Vladimir Shevelev, Nov 04 2014

Keywords

Comments

After a(0) = 0, A048278 gives the positions of seven other zeros in the sequence. - Antti Karttunen, Nov 04 2014

Crossrefs

A249714 and A249715 give the record values and their positions.
Differs from A249442 for the first time at n=9.

Programs

  • Maple
    A249695 := proc(n)
        a41n := A249441(n) ;
        if a41n = 0 then
            return 0;
        end if;
        bi := 1;
        for i from 0 do
            if modp(bi,a41n^2)= 0 then
                return i;
            end if;
            bi := bi*(n-i)/(1+i) ;
        end do:
    end proc: # R. J. Mathar, Nov 04 2014
  • Mathematica
    bb[n_] := Table[Binomial[n, k], {k, 1, (n - Mod[n, 2])/2}];
    a41[n_] := If[MemberQ[{0, 1, 2, 3, 5, 7, 11, 23}, n], 0, For[p = 2, True, p = NextPrime[p], If[AnyTrue[bb[n], Divisible[#, p^2]&], Return[p]]]];
    a[n_] := If[(a41n = a41[n]) == 0, 0, For[i = 1, True, i++, If[Divisible[ Binomial[n, i], a41n^2], Return[i]]]];
    a /@ Range[0, 100] (* Jean-François Alcover, Mar 27 2020 *)
  • PARI
    A249695(n) = { forprime(p=2,3,for(k=0,floor(n/2),if((0==(binomial(n,k)%(p*p))),return(k)))); return(0); } \\ Straightforward and unoptimized version. But fast enough for 10000 terms.
    A249695(n) = { for(p=2,3, my(o=0); for(k=1, n\2, o+=valuation((n-k+1)/k, p); if(o>1, return(k)))); return(0); } \\ This version is based on Charles R Greathouse IV's code for A249441.
    for(n=0, 10000, write("b249695.txt", n, " ", A249695(n)));
    \\ Antti Karttunen, Nov 04 2014

A249452 Numbers k such that A249441(k) = 3.

Original entry on oeis.org

15, 31, 47, 63, 95, 127, 191, 255, 383, 511, 767, 1023, 1535, 2047, 3071, 4095, 6143, 8191, 12287, 16383, 24575, 32767, 49151, 65535, 98303, 131071, 196607, 262143, 393215, 524287, 786431, 1048575, 1572863, 2097151, 3145727, 4194303, 6291455, 8388607, 12582911
Offset: 1

Views

Author

Vladimir Shevelev, Oct 29 2014

Keywords

Comments

Or k for which none of entries in the k-th row of Pascal's triangle (A007318) is divisible by 4 (cf. comment in A249441).
Using the Kummer carries theorem, one can prove that, for n>=2, a(n) has the form of either 1...1 or 101...1 in base 2.
The sequence is a subset of so-called binomial coefficient predictors (BCP) in base 2 (see Shevelev link, Th. 6 and Cor. 8), which were found also using Kummer theorem and have a very close binary structure.

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[(15 + 16 x - 14 x^2 - 16 x^3)/(1 - x -2 x^2 + 2 x^3), {x, 0, 70}], x] (* Vincenzo Librandi, Oct 30 2014 *)
    LinearRecurrence[{1,2,-2},{15,31,47,63},40] (* Harvey P. Dale, Apr 01 2019 *)
  • PARI
    a(n)=if(n==1, 15, (n%2+2)<<(n\2+3)-1) \\ Charles R Greathouse IV, Nov 06 2014
    
  • PARI
    is(n)=(n+1)>>valuation(n+1, 2)<5 && !setsearch([1, 2, 3, 5, 7, 11, 23], n) \\ Charles R Greathouse IV, Nov 06 2014

Formula

a(n) has either form 2^k - 1 or 3*2^m-1, k, m >= 4 (cf. A000225, A055010). Since, for k>=5, 2^k-1<3*2^(k-1)-1<2^(k+1)-1, we have that, for n>=1, a(2*n) = 2^(n+4)-1; a(2*n+1) = 3*2^(n+3)-1. - Vladimir Shevelev, Oct 29 2014, Nov 06 2014
a(1) = 15, and for n>1, a(n) = A052955(n+6). [Follows from above] - Antti Karttunen, Nov 03 2014
G.f.: (15+16*x-14*x^2-16*x^3)/(1-x-2*x^2+2*x^3); a(n) = 16*A029744(n)-1. - Peter J. C. Moses, Oct 30 2014

Extensions

More terms from Peter J. C. Moses, Oct 29 2014

A048278 Positive numbers n such that the numbers binomial(n,k) are squarefree for all k = 0..n.

Original entry on oeis.org

1, 2, 3, 5, 7, 11, 23
Offset: 1

Views

Author

Keywords

Comments

It has been shown by Granville and Ramaré that the sequence is complete.
These are all the positive integers m that, when m is represented in binary, contain no composites represented in binary as substrings. - Leroy Quet, Oct 30 2008
This is a number-theoretic sequence, so it automatically assumes that n is positive. To quote Granville and Ramaré, "From Theorem 2 it is evident that there are only finitely many rows of Pascal's Triangle in which all of the entries are squarefree. In section 2 we show that this only occurs in rows 1, 2, 3, 5, 7, 11 and 23 (a result proved by Erdős long ago)." - N. J. A. Sloane, Mar 06 2014
See also comment in A249441. - Vladimir Shevelev, Oct 29 2014
This sequence is equivalent to: Positive integers n such that Fibonacci(n+1) divides n!. This comment depends on the finiteness of A019532. - Altug Alkan, Mar 31 2016

Examples

			n=11: C[11,k] = 1, 11, 55, 165, 330, 462, ... are all squarefree (or 1).
		

Crossrefs

Programs

  • Maple
    select(n -> andmap(t -> numtheory:-issqrfree(binomial(n,t)),[$1..floor(n/2)]),[$1..100]); # Robert Israel, Oct 29 2014
  • Mathematica
    Do[m = Prime[n]; k = 2; While[k < m/2 + .5 && Union[ Transpose[ FactorInteger[ Binomial[m, k]]] [[2]]] [[ -1]] < 2, k++ ]; If[k >= m/2 + .5, Print[ Prime[n]]], {n, 1, PrimePi[10^6]} ]
    Select[Range[10^3], Function[n, AllTrue[Binomial[n, Range@ n], SquareFreeQ]]] (* Michael De Vlieger, Apr 01 2016, Version 10 *)
  • PARI
    is(n)=for(k=0,n\2,if(!issquarefree(binomial(n,k)),return(0))); 1 \\ Charles R Greathouse IV, Mar 06 2014

Formula

Integers n>0 in set difference between union (A000225, A055010) and A249452. - Vladimir Shevelev, Oct 30 2014
a(n) = A018253(n+1) - 1. - Altug Alkan, Apr 26 2016

Extensions

Edited by Ralf Stephan, Aug 03 2004

A249723 Numbers n such that there is a multiple of 9 on row n of Pascal's triangle with property that all multiples of 4 on the same row (if they exist) are larger than it.

Original entry on oeis.org

9, 10, 13, 15, 18, 19, 21, 27, 29, 31, 37, 39, 43, 45, 46, 47, 54, 55, 59, 63, 75, 79, 81, 82, 83, 85, 87, 90, 91, 93, 95, 99, 103, 109, 111, 117, 118, 119, 123, 126, 127, 135, 139, 151, 153, 154, 157, 159, 162, 163, 165, 167, 171, 175, 181, 183, 187, 189, 190, 191, 198, 199, 207, 219, 223, 225, 226, 229, 231, 234, 235, 237, 239, 243, 245, 247, 251, 253, 255
Offset: 1

Views

Author

Antti Karttunen, Nov 04 2014

Keywords

Comments

All n such that on row n of A095143 (Pascal's triangle reduced modulo 9) there is at least one zero and the distance from the edge to the nearest zero is shorter than the distance from the edge to the nearest zero on row n of A034931 (Pascal's triangle reduced modulo 4), the latter distance taken to be infinite if there are no zeros on that row in the latter triangle.
A052955 from its eight term onward, 31, 47, 63, 95, 127, ... seems to be a subsequence. See also the comments at A249441.

Examples

			Row 13 of Pascal's triangle (A007318) is: {1, 13, 78, 286, 715, 1287, 1716, 1716, 1287, 715, 286, 78, 13, 1} and the term binomial(13, 5) = 1287 = 9*11*13 occurs before any term which is a multiple of 4. Note that one such term occurs right next to it, as binomial(13, 6) = 1716 = 4*3*11*13, but 1287 < 1716, thus 13 is included.
		

Crossrefs

Complement: A249724.
Natural numbers (A000027) is a disjoint union of the sequences A048278, A249722, A249723 and A249726.

Programs

  • PARI
    A249723list(upto_n) = { my(i=0, n=0); while(i
    				

A249724 Numbers k such that on row k of Pascal's triangle there is no multiple of 9 which would be less than any (potential) multiple of 4 on the same row.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 11, 12, 14, 16, 17, 20, 22, 23, 24, 25, 26, 28, 30, 32, 33, 34, 35, 36, 38, 40, 41, 42, 44, 48, 49, 50, 51, 52, 53, 56, 57, 58, 60, 61, 62, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 76, 77, 78, 80, 84, 86, 88, 89, 92, 94, 96, 97, 98, 100, 101, 102, 104, 105, 106, 107, 108, 110, 112, 113, 114, 115, 116, 120, 121
Offset: 1

Views

Author

Antti Karttunen, Nov 04 2014

Keywords

Comments

Disjoint union of {0} and the following sequences: A048278 (gives 7 other cases where there are neither multiples of 4 nor 9 on row k), A249722 (rows where a multiple of 4 is found before a multiple of 9), A249726 (cases where the least term on row k which is a multiple of 4 is also a multiple of 9, and vice versa, i.e., such a term a multiple of 36).
If A249717(k) < 3 then k is included in this sequence. This is a sufficient but not necessary condition, e.g., A249717(25) = 5, but 25 is also included in this sequence.

Crossrefs

Programs

  • PARI
    A249724list(upto_n) = { my(i=0, n=0, dont_print=0); while(i
    				

A249714 Record values in A249695.

Original entry on oeis.org

0, 1, 3, 6, 7, 12, 21, 24, 48, 96, 192, 384, 768, 1536, 3072, 6144, 12288, 24576, 49152, 98304, 196608, 393216, 786432, 1572864, 3145728, 6291456, 12582912, 25165824, 50331648
Offset: 1

Views

Author

Keywords

Comments

For n >= 8 [a(8) = 24], the terms seem to be given by A007283(n-5), i.e. as 3 * 2^(n-5).

Crossrefs

A249715 gives the positions where these values occur in A249695 for the first time.

Programs

  • PARI
    A249695(n) = { for(p=2,3,for(k=0,floor(n/2),if((0==(binomial(n,k)%(p*p))),return(k)))); return(0); } \\ Unoptimized and straightforward.
    A249695(n) = { for(p=2,3, my(o=0); for(k=1, n\2, o+=valuation((n-k+1)/k, p); if(o>1, return(k)))); return(0); } \\ Better to use this. Based on Charles R Greathouse IV's PARI-code for A249441.
    prevmax = -1; i = 0; for(n=0, 123456789, if((k=A249695(n)) > prevmax, prevmax = k; i++; write("b249714.txt", i, " ", k); write("b249715.txt", i, " ", n))); \\ Compute both A249714 & A249715 at the same time.

Formula

a(n) = A249695(A249715(n)).
Showing 1-6 of 6 results.