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.

A145808 Non-palindromic balanced numbers: the first and the last half of digits have the same sum.

Original entry on oeis.org

1010, 1102, 1120, 1203, 1212, 1230, 1304, 1313, 1322, 1340, 1405, 1414, 1423, 1432, 1450, 1506, 1515, 1524, 1533, 1542, 1560, 1607, 1616, 1625, 1634, 1643, 1652, 1670, 1708, 1717, 1726, 1735, 1744, 1753, 1762, 1780, 1809, 1818, 1827, 1836, 1845, 1854
Offset: 1

Views

Author

M. F. Hasler, Nov 17 2008

Keywords

Comments

Numbers such that the first half of digits have the same sum than the last half of digits are called balanced in the linked "Problem 217". (Note that here the meaning of "balanced" is neither that of A020492, nor that of A031443.)
Clearly all palindromes (A002113) have this property. Since the first non-palindromic example, 1010, comes only after A002113(109)=1001, we list here only non-palindromic balanced numbers.

Crossrefs

Cf. A147808.

Programs

  • Mathematica
    Reap[Do[id=IntegerDigits[n];m=Floor[Length[id]/2];If[Reverse[id]!=id&&Total[Take[id,m]]==Total[Take[id,-m]],Sow[n]],{n,1010,2000}]][[2,1]] (* Zak Seidov, Oct 20 2009 *)
    npbnQ[n_]:=Module[{idn=IntegerDigits[n],len},len=Floor[Length[idn]/2];idn!=Reverse[idn]&&Total[Take[idn,len]]==Total[Take[idn,-len]]]; Select[ Range[1000,2000],npbnQ] (* Harvey P. Dale, Sep 25 2012 *)
  • PARI
    is_A145808(n) = is_balanced(n) & !is_A002113(n)
    is_balanced(n) = { local( d, t=1+#Str(n)); (n\10^(t\2)-n%10^((t-1)\2)) % 9 && return; d=Vecsmall(Str(n)); sum(i=1,(t-1)\2,d[i]-d[t-i])==0 }

Formula

A145808 = { m | A007953([m/10^A110654(A055642(m))]) = A007953(m mod 10^A004526(A055642(m))) } \ A002113

A147811 Alexandrian integers: numbers of the form n=pqr such that 1/n = 1/p - 1/q - 1/r for some integers p,q,r.

Original entry on oeis.org

6, 42, 120, 156, 420, 630, 930, 1428, 1806, 2016, 2184, 3192, 4950, 5256, 8190, 8364, 8970, 10296, 10998, 12210, 17556, 19110, 21114, 23994, 24492, 28050, 32640, 33306, 34362, 37506, 39270, 44310, 52326, 57684, 57840, 70686, 74256, 79800, 83076
Offset: 1

Views

Author

M. F. Hasler and Alexis Olson (AlexisOlson(AT)gmail.com), Dec 13 2008

Keywords

Comments

The numbers are of the form p(p+d)(p+(p^2+1)/d), where d runs over divisors of p^2+1 and p runs over all positive integers. See also A147807..A147810. - M. F. Hasler, Jan 07 2009

Examples

			630 is an Alexandrian integer since 630 = 5(-7)(-18) and 1/630 = 1/5 - 1/7 - 1/18.
		

Crossrefs

Programs

  • Maple
    N:= 10^5: # to get all terms <= N
    A:= select(`<=`,{seq(seq(p*(p+d)*(p+(p^2+1)/d), d=numtheory:-divisors(p^2+1)),p=1..floor(N^(1/3)))},N):
    sort(convert(A,list)); # Robert Israel, Dec 16 2018
  • PARI
    is_A147811(n) = { my(d=divisors(n), c=#d+1); n<42 && return(n==6); for( i=2, c-3, d[i+1]^2>d[c-i] && return; d[c-i]%d[i]==1 | next; for( j=i+1, c-i,d[j]^2>d[c-i] && next(2); d[c-i]\d[j]*(d[j]-d[i]) == d[j]*d[i]+1 && return(1))) }

A147842 Sum of all balanced numbers less than 10^n.

Original entry on oeis.org

45, 540, 50040, 3364890, 334795890, 27671338200, 2761284321300, 241066406350560, 24071550717893160, 2164109364980520560, 216167870783354294560, 19804111510101766391920, 1978598460245429017365520, 183672136030518949796846320
Offset: 1

Views

Author

Alexis Olson (AlexisOlson(AT)gmail.com), Nov 14 2008

Keywords

Comments

See reference for definition of balanced number.
Partial sums of A147808. Up to n=3, equal to the sum of palindromes A002113 < 10^n; then it differs from this sequence by the sum of terms < 10^n in A145808. - M. F. Hasler, Nov 23 2008

Programs

Formula

a(n) = Sum_{k=1..n} A147808(k). - M. F. Hasler, Nov 23 2008

Extensions

a(9)-a(12) from M. F. Hasler, Nov 23 2008
a(13)-a(46) added by Wei Zhou, Oct 10 2011
Showing 1-3 of 3 results.